How to dynamically add columns to the table

Hi all

I'm new to ADF and need help on sub condition.

We have created a ViewObject on the EMPLOYEE table that has under columns:

EMP_ID,

EMP_NAME,

DEPARTMENT,

COST_CENTER,

BUSINESS_UNIT

COUNTRY

GCODE

We need to create a page in the ADF with employee table to show only below the columns

EMP_ID,

EMP_NAME,

DEPARTMENT,

COST_CENTER

Later, if necessary user should be able to add other columns to the page dynamically.

Can you please advice on how to implement this feature.

Thank you.

Kind regards

Vidya

Hello.

There could be a simple solution, which is to use the component PanelCollection.

Drag ' drop your VO to a page and create a Table with all the attributes.

For columns that emp_id, emp_name, cost_center, set the Visible property to false.

Put the PanelCollection component on your page and drag your table inside.

When you run the page you will see the view menu in the upper left corner of the table above. You can show/hide columns in this menu.

Tags: Java

Similar Questions

  • dynamically create columns of the table...

    I have three tables

    'DQ_SUMMARY' with column (ATTRIBUTE_NAME, OWNER)
    "di_proposition" with a single column (PROP_NAME) and have values (MP, upward, AP)
    "dq_parameter" with a single column (PARAMETER) and have values (TOTAL_RECORDS, TOTAL_DEFECT, DQ)



    now I want to add the new column in "DQ_SUMMARY" of the combination of the values of table 'di_proposition' & 'dq_parameter '.

    that is now "DQ_SUMMARY" have & I want to add the new column name and column (ATTRIBUTE_NAME, OWNER)
    MP_TOTAL_DRECORDS, MP_TOTAL_DEFECT, MP_DQ, UP_ (TOTAL_RECORDS...

    If they are already present in 'DQ_SUMMARY', create not and if not then create.

    & If I add a new value in the table 'di_proposition' & 'dq_parameter', then it also adds columns to the values

    I write the code below but further, I'm not able.

    pls help me...



    create or replace
    PROCEDURE DQ_SUMMARY_REPORT
    AS

    CURSOR cur_user_tab_cols
    IS SELECT column_name
    Of user_tab_cols
    WHERE column_name = 'DQ_SUMMARY ';

    CURSOR cur_di_proposition
    IS SELECT pro_name
    OF di_proposition
    WHERE pro_name = 'MPLS;

    CURSOR cur_dq_parameter
    IS SELECT Parameter_name
    OF dq_parameter;



    BEGIN

    INSERT INTO dq_summary (ATTRIBUTE_NAME, ENTITY_NAME)
    SELECT a.ATTRIBUTE_NAME, b.ENTITY_NAME
    DI_ATTRIBUTE_MASTER a, DI_ENTITY_MASTER b
    WHERE a.entity_id = b.entity_id;

    FOR c_prop IN cur_di_proposition
    LOOP

    FOR c_para IN cur_dq_parameter
    LOOP

    IF c_prop.pro_name |' _'. c_para.parameter_name




    END DQ_SUMMARY_REPORT;
    CURSOR cur_user_tab_cols
    IS SELECT column_name
    FROM user_tab_cols
    WHERE column_name = 'DQ_SUMMARY';
    

    change the condition WHERE table_name = 'DQ_SUMMARY ';

  • Add columns to the table

    I'm having a bit of a basic problem here...

    I start with a waveform D 1 from a request of data acquisition, which contains ~ 22 columns of data corresponding to the different measures. I wanted to take the first 20 columns of data and add the "column vectors" (i.e. each measure) for a 1 d table (the sum of the first 1 22 tables/measures/vectors). The logical way to proceed, it seems, is by indexing the waveform with a loop, conversion in DBL and then adding each column with a registry change.

    1 d Waveform--> for (indexed) loop--> get waveform components to get the DBL table to the index column--> go to 'add block '.

    And then, using a shift register, I add each column in the index.

    However, I get no output once for the finished loop.

    Any ideas? Examples are JPEG/png files please!

    I'm a big fan of doing things the easy way.

  • How to update exists column on the table with the exact number and auto increment

    Hello

    I have a table with more than 10 million rows and there is a column called 'number_zaq', I want to update this column on line frist from 2000 and + 1 for the next all ranks.

    Update your_table

    Set number_zaq = rownum + 2000-1;

  • How to make 2 columns in the table with a long row of data Tyube

    Hello world

    I want to do in my column of table 2 with data Tyube long raw

    How this


    Thank you very much

    I don't think it's possible, use BLOB.

  • How to remove columns from the table on the master 1-0?

    I have an array of 96 columns with strings. I also have the array of int 96-elemets (mask) with 1 and 0.

    What I want to do is to is to remove (or hide - but I read that it is not possible) all the columns with index corresponding to 0 in the mask table.

    example:

    columns in the table

    1 2 3 4 5

    mask

    0 1 0 0 1

    I want to remove the columns 1, 3 and 4 and leave only 2 and 5 in my table.

    How can I do?

    If I create loop for with i as the index of the column, when I do DeleteTableColumns() columns number decreases, and I get an error of range out of

    Or do I have an option to hide the unnecessary columns (not set their width to 1, it's very ugly-looking)?

    Please help me (())

    Hello rovnyart!

    1. removal of columns in the table:

    I suspect that the reason why you get the out-of-range error is due to fact that in your loop, you delete the columns in the table, you'll eventually end up by referring to a column that no longer exists, because the other columns before it have been deleted. While you remove each column of your table in the loop for example, the column index number will move, because you deleted the other columns in front of her.

    To resolve this, even if you delete a column in your loop, make sure that you take also into account that the index of the column is moved because of the removed columns.

    2 hide columns in table:

    You can use the ATTR_COLUMN_VISIBLE attribute to hide columns in the table:

    http://forums.NI.com/T5/LabWindows-CVI-idea-exchange/add-attr-column-visible-attribute-for-table-Col...

    http://zone.NI.com/reference/en-XX/help/370051Y-01/CVI/uiref/cviattrcolumnvisible_column/

    3 alternatives:

    Note that another alternative would also use a tree instead, control as the tree control also supports the hidable columns:

    http://forums.NI.com/T5/LabWindows-CVI/table-hide-column/TD-p/569773

    Best regards!

    -Johannes

  • How to use the transformation script to add columns to the PK?

    I'm working on a script transformation that:
    -create a table
    -Adds the columns to the table
    -create a primary key for the table

    See the below script.
    Now, I want to add the primary key column.
    Documentation fix r: class IndexColumnUsage

    The Index of the class has a getter: getIndexColumnUsageList()
    and the list apply: applyIndexColumnUsageList

    Someone at - it an idea how to use these methods to add the column to the PK?

    I thank in advance.


    relational = model.getDesign () .getFirstOpenRelationalDesign ();
    table = relational.getTableSet () .createTable (null);
    table.setName ("TABLE");
    column = table.createColumn (null);
    column.setName ("COLUMN");
    index = table.createIndex (null);
    index.setName ("PK");
    index.setIndexState ("primary obligation");

    Hello

    If you have the column and index (both belonging to the same table) use:

    the index. Add (Column);

    to remove the column:

    the index. Remove (Column)

    Philippe

  • Unable to add a new column to the table of the LCD? Option, just usually add it.

    I have a form of LCD with a table in it. Im trying to simply add a new column to the table. The option is there, but the column appear just after clicking Add the column to the left. I selected a column, right click the space > insert > column to the left. But the habit intsert. The object table properties tab shows lines and colum numbers, but they are grey.

    See screenshots:

    http://www.emermed.NET/staging/forums...

    http://www.emermed.NET/staging/forums...

    It is a dynamic array, where a new line can be inserted using a button. Is that the dynamic nature of the question? ID hate to cancel all the flow dynamics and programming just to add a column, and then reapply them all.

    Thank you!

    Hello

    You do not add the columns in the object > palette (screenshot 2) of the Table. I suspect that the problem is that it is not enough on the page (in the content area) to add the column. In the screenshot 1, if you look at the width of the column highlighted from the space to the right of the table, you will see that a column can be added due to restrictions of space.

    Reduce the width of the column highlighted (temporarily), and then add a column. Once added, you can resize the columns to match the width of the page.

    Hope that helps,

    Niall

  • How to create a status column in the table

    Hello everyone

    I am trying to create a column of the table status in frontview Panel. I enclose a picture with her to say clearly what I say.plz tell me how to create the active status column in the table.

    I want to show green for safety stock and red for safety stock below.


  • How to find the primary key columns in the tables in MS Access using SQL queries

    How to find the primary key columns in the tables in MS Access using SQL queries

    Hello

    This is the forum for Windows Vista programs related issues.

    For better assistance, please try instead the Forums in SQL Server .

    Thank you! Vincenzo Di Russo - Microsoft MVP Windows Internet Explorer, Windows Desktop Experience & security - since 2003. ~ ~ ~ My MVP profile: https://mvp.support.microsoft.com/profile/Vincenzo

  • How to find a value in any column of the table - essentially a search

    Hi guys,.

    Thanks in advance for your help.

    I'll try to find a value in any column of the table? How can I do?

    An example of value would be "FEDERAL."

    Using Oracle 11 g and SQL Developer.

    Thank you

    It's a question that is asked in the past several times (but not recently from what I remember).

    Michaels has provided in the past, solutions which are quite clever, just using SQL...

    10g of solution

    Michaels > var val varchar2 (5)

    Michaels > exec: val: = "Sub".
    PL/SQL procedure successfully completed.

    Michaels > select distinct substr (: val, 1, 11) "keyword."
    substr (table_name, 1, 14) "table."
    substr (t.column_value.getstringval (), 1, 50) ' / value of the column.
    CLO.
    Table
    (xmlsequence
    (dbms_xmlgen.getxmltype ("select" | column_name))
    || 'from ' | table-name
    || ' where upper (')
    || column_name
    || ') as superior (' %' |: val)
    || '%'')'
    ) .extract (' LINES/rowset / * "")
    )
    ) t
    -where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'SERVICES')
    order of the "Table".

    11g upwards

    SQL > select table_name,.
    column_name,
    : search_string search_string.
    result
    from (select column_name,
    table_name,
    "ora: view("' ||) " table_name | "") / LINE /' | " column_name | "[ora:contains (text ()," %' |: search_string | ")]. (%») > 0]' str
    CLO
    where table_name in ('EMP', 'Department')),
    XMLTable (columns str result varchar2 (10) path '.')
    /

    TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
    ------------------------------ ------------------------------ -------------------------------- ----------
    DEPT                           DNAME                          es                               RESEARCH
    EMP                            ENAME                          es                               JAMES
    EMP                            JOB                            es                               SALESMAN
    EMP                            JOB                            es                               SALESMAN

    4 selected lines.

  • How to add columns in my table?

    Guys, im not being able to add my columns in the table, can anyone help me?

    Thank you!
    TableView<String> tv = new TableView<>();
      tv.setVisible(true);
            
           TableColumn firstNameCol = new TableColumn();
           TableColumn lastNameCol = new TableColumn();
           TableColumn emailCol = new TableColumn();
           tv.getColumns().add(0,firstNameCol); 

    It allows to use javafx.scene.control.TableColumn, not javax.swing.table.TableColumn :)

  • How to check the index, on the number of columns in the table is created

    How to check on the number of columns in the table the index has been created. ??

    OR

    How check index, on the number of columns in the table that it is been created?

    890306 wrote:
    How to check on the number of columns in the table the index has been created. ??

    >

    OR

    How check index, on the number of columns in the table that it is been created?

    query USER_IND_COLUMNS

    SQL> desc user_ind_columns
     Name                            Null?    Type
     ----------------------------------------- -------- ----------------------------
     INDEX_NAME                             VARCHAR2(30)
     TABLE_NAME                             VARCHAR2(30)
     COLUMN_NAME                             VARCHAR2(4000)
     COLUMN_POSITION                        NUMBER
     COLUMN_LENGTH                             NUMBER
     CHAR_LENGTH                             NUMBER
     DESCEND                             VARCHAR2(4)
    

    Handle: 890306
    Status level: Beginner
    Join date: October 8, 2011
    Messages total: 13
    Total Questions: 5 (5 open)

    Why all the question still pending?

    Published by: sb92075 on December 3, 2011 17:21

  • Dynamic number of columns in the table

    Hello

    I use JDev 10.1.3.3.0 with ADF. I just want to create a table, with a dynamic number of columns in the table. The background is that a user of my webapplication can create and submit a sql query. Now, I have to show him the results. My idea was, I have save the result in a bean managed (ResultTable), which is stored in the session context and map at my table in my page.

    If I search the Forum and don't get only one useful thread: {: identifier of the thread = 971888}, but I don't exactly understand. What is the CollectionModel? Do I need this?

    I'm trying to report on the following:

    ResultTable
    public class ResultTable {
    
        public static final String SESSION_NAME = "ResultTable";
        private ArrayList<ResultColumn> columnList; 
        private CollectionModel collectionModel;
    
        public ResultTable() {
        }
    
        public ArrayList<ResultColumn> getColumnList() {
            return columnList;
        }
    
        public void setColumnList(ArrayList<ResultColumn> columnList) {
            this.columnList = columnList;
        }
    }
    ResultColumn
    public class ResultColumn {
        
        private ArrayList<ResultRow> rowList;
        private String name;
    
        public ResultColumn() {
        }
    
        public ArrayList<ResultRow> getRowList() {
            return rowList;
        }
    
        public void setRowList(ArrayList<ResultRow> rowList) {
            this.rowList = rowList;
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    }
    ResultTable
    public class ResultRow {
        
        private String value;
    
        public ResultRow() {
        }
    
        public String getValue() {
            return value;
        }
    
        public void setValue(String value) {
            this.value = value;
        }
    }
    My showResult.jspx
    <af:table emptyText="No items were found"
              value="ResultTable.columnList"
              var="column"
              varStatus="colStatus"
              id="table1">
      <af:forEach items="#{column.rowList}" var="row" varStatus="rowStatus">
        <af:column sortable="false" headerText="#{column.name}" 
                   id="column#{colStatus.index}">
          <af:outputText value="#{row.value}"
                         id="outputText#{rowStatus.index}"/>
        </af:column>
      </af:forEach>
    </af:table>
    The ResultTable was filled with data, but the Board is not filled. So, I think, it must be rejected to the data binding.

    I get warnings and errors to run too. But I don't know if they are the result or cause of my problem.
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.renderkit.core.xhtml.TableRenderer renderTableWithoutColumns
    WARNUNG: Table with id: form1:table1 has no visible columns!
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:span does not match start name:div
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:span does not match start name:div
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:form does not match start name:span
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:body does not match start name:form
    27.10.2009 10:15:41 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElement
    SCHWERWIEGEND: Element End name:html does not match start name:body
    Concerning

    Majo

    Hi Mario,.

    
      
        
          
        
      
    
    

    Note that your JSPX snippet above has serious shortcomings:

  • 'ResultTable.rowList' is not an EL expression, but the value attribute of the af: table must refer to an EL expression
  • Items AF:foreach = "#{row.cellList}"-you don't have to store information about the columns of all rows, more it won't work as af:forEach tag may not see the value of the expression of EL #{line} (or any component EL expression created). " See the tagdoc here: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/forEach.html
  • "ID =" Column #{cellStatus.index} "and id =" outputText #{rowStatus.index} "are invalid and that they don't compile even as id attributes cannot contain EL expressions.

    .

    I think to solve your problem, you need three things:

  • List of columns (for example the list If you need to store only the names of column or list If you need additional information),.
  • list of lines,
  • a line can be a map (with the name of the column - cell data mapping; card e.g.) or a list (with columns indexed; for examplelist).

    Example with the lines of the map:

    JSPX snippet:

    
      
        
          
        
      
    
    

    The ResultTable bean:

    public class ResultTable {
    
        private List columnList;
        private List> rowList; 
    
        public ResultTable() {
        }
    
        public List getColumnList() {
            return columnList;
        }
    
        public void setColumnList(List columnList) {
            this.columnList = columnList;
        }
    
        public List> getRowList() {
            return rowList;
        }
    
        public void setColumnList(List> rowList) {
            this.rowList= rowList;
        }
    
    }
    

    Type ResultColumn:

    public class ResultColumn {
    
        // additional fields if needed...
        private String name;
    
        public ResultColumn() {
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    }
    

    AF:table display correctly after the initialization of the values in your beans properly filled ResultTalbe (e.g. to fill the list of rank with the lines).

    Hope this helps,
    Patrik

  • How Oracle to store geometry values in the columns of the table?

    How Oracle to store geometry values in the columns of the table?

    Check this box:
    [Oracle Spatial User guide | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14255/toc.htm]

    Check other documents space here.
    [http://www.oracle.com/pls/db102/portal.portal_db?selected=7]

    Published by: Anantha R on August 20, 2009 13:43

Maybe you are looking for

  • Video VHS copy using Satellite M50

    I recently bought a M50 laptop. I want to copy video standard VHS but cannot work on how to connect the recorder to the machine. I'm a newbie to useful suggestions would be appreciated

  • Satellite L305 - unreliable internet connection

    I have this same problem and it is really annoying (except I use a L305). Just to add to what the OP said, when the wireless light, for me at least, the wireless network adapter also disappears from the Device Manager. Sometimes my wireless will work

  • You can cancel registration of an event framework

    Hi all I am acquiring form a camera with an architecture very similar to one posted here. I join my camera for the event Frame was and is to acquire images without any problems. I want to do is stop the acquisition. I tried to cancel the registration

  • Private class data accessible parent in the child's class?

    Hello! I thought this would be obvious, but my search thing fails to me.  I hope that someone would be kind enough to answer my question LVOOP of beginner. I have a a parent class.  This parent class contains a set of private class data.  I have Setu

  • Is it the blackberry.invoke in the external JS file work?

    Hello The object blackberry.invoke cannot be called since in BB widget, i.e. in the js stored in your Eclipse BB Widget project file or files outside/external file, stored on http? Thank you Barbara