Access the value of text column header inside the loop forEach to a dynamic table: ADF 11 g

JDeveloper: 11.1.2.1.0

We have a requirement in which a dynamic array must be created. We are able to create the table. But we need the values for the dynamic to be columns the same as the name of the column.

We have written the following code. Column header is is filled correctly. But the outputText (i.e. the column values for each row are coming as null.

< af:forEach items = "#{backingBeanScope.backing_ReportsInterfaceBean.tableList}" var = "dynamicColumn" > "

< af:column sortable = "false" headerText = "#{dynamicColumn}" id = "c3dwd" >

< af:outputText value = "#{dynamicColumn}" id = "aot1" > < / af:outputText >

< / af:column >

< / af:forEach >

We are stuck

Emergency aid is much appreciated!

Hi Ashish,

Its a dynamic array. We had to access the column header.

I've solved through hit and trial. If I change the bean has been prominently worn rather than extensive backup of bean, it works. I don't know what is the reason for this, but now it works.

Thank you all.

Tags: Java

Similar Questions

  • Can not access the rows of an item of table no-netsed in execution of the embedded R

    Hi all

    I am running a script R (R running embedded) oracle database

    I use under request

    Select *.
    table (rqEval (cursor (select 'divider' 50, 500 "numDots" of the double),))
    "select 1 id, 1 double val,"
    'myRandomRedDots2'));


    I want to save the result in a variable. So under anonymous block has written


    declare

    ID number (10);

    Val number (10);

    Start

    SELECT id, val in id, val

    table (rqEval (cursor (select 'divider' 50, 500 "numDots" of the double),))

    "select 1 id, 1 double val,"

    'myRandomRedDots2'));

    end;

    /

    But I get the error "can not access an element of no nested table lines.

    The one you suggest please how to fix this.

    Thank you

    Billa


    Billa,.

    You see the error "can not access the lines of a no nested table element" of PL/SQL, because rqEval (..., ' select 1 id, 1 double val ',')

  • How to identify the last instance of a dynamic table row

    Hi all

    I'm trying to figure out how to create an action for my form in Livecycle Designer ES2, which will affect the last instance of a dynamic table row. I have a table with a repeatable row where the user will enter information about a part purchased and I have buttons that allow the user to add and remove the lines. I need to create a line extra addition button which will add a new instance of the repeatable table line (this is not a problem) and disable and change the background color of the first cell in the row added. The problem I have is how to have an action that affects the last instance of a line.

    If anyone knows how to do this in Javascript, I would appreciate some advice/help.

    Hello

    I think that it is beyond providing an action. You will have a need to write JavaScript directly.  When you call the addInstance method it returns the new line, if you can do something like;

    var line = Table1._Row1.addInstance ();

    line. TextField1.border.fill.color.value = "255,0,0";

    line. TextField1.access = 'protected ';

    To find the last line and do the same thing, you can do something like;

    var line = Table1.resolveNode ("Row1 [" + (Table1._Row1.count - 1) + "" "]" ");

    line. TextField1.border.fill.color.value = "255,0,0";

    line. TextField1.access = 'protected ';

    Concerning

    Bruce

  • Flex 3 - to access the names of objects label dynamically

    In Flex3 that it does not work, I guess because I do not know the equivalent for the _root

    for (var i: Number = 0; i < VehicleData.length; i ++) {}
    ["Mathilde" + i] cvsDispatch .text = VehicleData.getItemAt (i). VNAME;
    }

    I'm trying to access the labels named lblV0 etc that are on a Web cvsDispatch in the application.
    See you soon,.
    Rob

    I have it.
    Application ["lblV" + i]

  • How to select and default hightlight the first line in a programmatic Table(ADF Table created based on a SortableModel) ADF.

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    We created a table ADF programming related to a SortableModel created programmatically to a bean.


    We need to select and highlight the first row in the table just after making it to retrieve data based on the first line.


    We tried the based on the following thread: How to call the bean support just after JSFF / page fragment loads? and a few other posts online, but it does not work very well.


    W has created a hidden text in the bottom of the JSF model as follows:


    < af:table varStatus = "rowStat" Summary = "table" value = "#{pageFlowScope.crudBean.dynamicTable.collectionModel} '"

    Rows = "#{pageFlowScope.crudBean.dynamicTable.collectionModel.RowCount} '"

    contentDelivery = 'immediate' var = 'row' rendered = 'true '.

    Binding = "#{backingBeanScope.crudBackingBean.tasksTable} '"

    selectionListener = "#{backingBeanScope.crudBackingBean.customListener} '"

    "rowSelection ="single"id ="t1"partialTriggers =": pt_gr2 "columnStretching =" column: clmn0 ">

    < af:forEach items = "#{pageFlowScope.crudBean.dynamicTable.columnNames}" var = 'name' varStatus 'vs' = > "

    < af:column sortable = "true" sortProperty rowHeader = "#{name}" = "no style" headerText = "#{pageFlowScope.crudBean.dynamicTable.columnLabel [name]}" "

    inlineStyle = "width: 100px;"  ID = "clmn$ {vs.index}" >

    < af:activeOutputText value = "#{row [name]}" id = "aot1" / >

    < / af:column >

    < / af:forEach >

    < / af:table >

    ....


    < af:outputText id = "hiddenOutputTextId" visible = "false" value = "#{backingBeanScope.crudBackingBean.afterPageLoad} '"

    Binding="#{backingBeanScope.crudBackingBean.hiddenOutputText}"/ >

    And we have added the code to the bean to support below:

    public String getAfterPageLoad() {}

    If (!.) {AdfFacesContext.getCurrentInstance () .isPostback ()}

    selectFirstRowInTasksTable();

    }

    Return afterPageLoad;

    }

    public void selectFirstRowInTasksTable() {}

    try {}

    RKS RowKeySet = new RowKeySetImpl();

    RowKeySet rksEmpty = new RowKeySetImpl();

    Model CollectionModel = tasksTable.getValue ((CollectionModel));

    ROWCOUNT int = model.getRowCount ();

    If (rowcount > 0) {}

    model.setRowIndex (0);

    Key of the object = model.getRowKey ();

    RKS. Add (Key);

    tasksTable.setSelectedRowKeys (rks);

    SelectionEvent selectEvent =

    new SelectionEvent (tasksTable.getSelectedRowKeys (), rks, tasksTable);

    selectEvent.queue ();

    customListener (selectEvent); / / to retrieve data

    AdfFacesContext.getCurrentInstance () .addPartialTarget (tasksTable);

    }

    } catch (Exception e) {}

    }

    }

    I think that () selectEvent.queue; should work even without calling the customerListener, but it is not working in all cases.

    What is the problem in my code?



    Have you tried to bind property of 'selectedRowKeys' to selection configuration / bean there?

    Something like:

    public RowKeySet getSelectedRKS() {
        if (rks == null) {
            // make first record as selected
            // create RowKeySet and assign it to rks variable(where rks is variable defined in bean with some scope higher than request scope)
        }
        return rks;
    }
    

    Dario

  • How to view the last element in a dynamic table 1 d

    Hello..

    I want to display the value of the last element in a dynamic array 1 d... / I mean... If I stop the vi race, I need to display the last element of the array... How can I do this?

    and is it possible to use a button to start the vi... instead of using the Run button on the face before of the vi?

    An array of index!.  Size of table allows to determine the size of your array, subtract 1, that feed into the terminal array of Index index.

    You start the VI running somehow.  It can be assigned to run when opening.  Assuming that what you want is a way to type values in a front panel, press a GO button you created on the front panel, then have the real part of the VI to run.  You can use a structure of the event.  Or put a while loop at the beginning with a small wait next statement which basically just asks the GO button.  When you press this button, the Boolean value true stops the whole loop and allows the program to move on the main body of your program.

  • The loop ForEach with If / ElseIf failling

    Hoping someone could point out what im doing here wrong.

    $VMServers = @("Server01", "Server02", "Server03", "Server04", "Server05", "Server06", "Server07", "Server08", "Server09", "Server10", "Server11", "Server12", "Server13", "Server14", "Server15", "Server16", "Server17", "Server18")
    
    
    foreach($VM in $VMServers) {
      Write-Host "Server Name in Loop is "$VM
      notepadIF ($VM = "Server01") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "DB Server SAP Node 1"}
      ElseIF ($VM = "Server02") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "DB Server SAP Node 2"}
      ElseIF ($VM = "Server03") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "DB Server SAP Node 3"}
      ElseIF ($VM = "Server04") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "DB Server SAP Node 4"}
      ElseIF ($VM = "Server05") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HCP (CRM) Central Instance"}
      ElseIF ($VM = "Server06") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HCP (CRM) App Server 1"}
      ElseIF ($VM = "Server07") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HCP (CRM) App Server 1"}
      ElseIF ($VM = "Server08") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HJP (ADS + BW Portal) "}
      ElseIF ($VM = "Server09") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HGP (GW)"}
      ElseIF ($VM = "Server10") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HLP (Livecache)"}
      ElseIF ($VM = "Server11") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HXP (PI)"}
      ElseIF ($VM = "Server12") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HOP (BOE)"}
      ElseIF ($VM = "Server13") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "Arezzo DB Node 1 (& IIS)"}
      ElseIF ($VM = "Server14") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "Arezzo DB Node 2 (& IIS)"}
      ElseIF ($VM = "Server15") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "OpenText Archive"}
      ElseIF ($VM = "Server16") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "OpenText Content"}
      ElseIF ($VM = "Server17") {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "OpenText Admin"}
      Else {
      Set-Annotation $VM -CustomAttribute "01 - System Role" -Value "HBP (BW)"}
    }
    
    

    What I thought should be pretty self-explanatory, that loop to control the name of the server in the variable and depending on what server name, returns the correct description.

    However, the output shows that, on each loop, he still thinks the variable = Server1, which we know is not true the output of write-host.

    In the loop server name is server01

    AnnotatedEntity name value

    --------------- ----                 -----

    SERVER01 01 - node system role DB Server SAP 1

    In the loop server name is server01

    SERVER01 01 - node system role DB Server SAP 1

    Name of the server in the loop is Server02

    SERVER01 01 - node system role DB Server SAP 1

    Name of the server in the loop is Server03

    Grateful if anyone could tell em what im doing here who won't.

    Thanks in advance!

    Replacing the '=' sign in

    $VM = "ServerXX".

    with

    $VM - eq "ServerXX".

    should work.

    André

  • To access the page defined by a dynamic action item

    I have a page element that is defined by a dynamic action. However, if I try to access this page anywhere else on the page element, it is null. Y at - it a specific method to dynamically reference the value of page elements, other than the usual & p2_page_item. reference. TIA.

    Hello!

    Where do you reference point? In another DA, process page?

    & NOM_ELEMENT. the syntax is only for the static text and it will be avoided in SQL and PL/SQL. It will get only value when the page is loaded.

    If you are referencing the element DA or JS, you can get its value with the function $v (for example $v('ITEM_NAME'). If you reference the process item, you can get its value with the standard bind variables syntax (: nom_element) or with the function v (for example v('ITEM_NAME'). If this process is inside the dynamic action, value of the item must be saved before session state.

    BR,
    Marko

  • How to access all the lines one by one, a table ADF via managed bean

    Hi Experts,

    Hi I'm new in the ADF.

    Could someone help me to fix the case below?

    Scenario - I have a table called Test_T1 that have 4 columns C1, C2, C3, C4. Creation of EO, VO and AM for test_t1.
    When created in pages ADF, I selected the option "automatically exposed components UI in new managed bean" (mynewmanagedbean.java).
    Control data drag and drop Test_T1 table in the page as a table of the ADF.
    Set the properties is read-only C1, C2, C3 and C4 is an input text.
    Add after the table and attathed button action on the mynewmanagedbean.java bean managed.
    At the time of the Test_T1 page filled with a few No.. lines (such as 9).
    How can I access all the lines above through the key without selection of these.
    In fact, I want to print all the rows of the table in the log at the time to press the button.

    Thanks in advance.

    Sorry for the delay, the code was copied from another test case. You can work directly with the line...
    I created a new test case based on the departments of the HR schema table:

    import oracle.adf.model.BindingContext;
    import oracle.adf.model.bean.DCDataRow;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.logging.ADFLogger;
    
    import oracle.jbo.Row;
    
    public class DumpRows
    {
        private static ADFLogger _logger = ADFLogger.createADFLogger(DumpRows.class);
        public DumpRows()
        {
        }
    
        public String cb3_action()
        {
            DCBindingContainer bindings =
            (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding dcIteratorBindings =
            bindings.findIteratorBinding("DepartmentsView1Iterator");
    
            // Get all the rows of a iterator
            Row[] rows = dcIteratorBindings.getAllRowsInRange();
            for (Row row : rows) {
                String depname = (String)row.getAttribute("DepartmentName");
                _logger.info(depname);
            }
            return null;
        }
    }
    

    As you do not have the class of line interface build you must get the attributes in their names. Be careful here, because any misspelling is cought only when you run the application.

    Timo

  • To access the added Variables of Classes dynamically

    I'm not sure what the terminology is here, but it's what I do.

    I added the officials in the field via a loop and add to the screen

         // loop through all of the elements and setup the forums
            for (int i = 0; i < size; i++)
            {
                c_ForumSelect frm = new c_ForumSelect();
                frm = (c_ForumSelect) v_forums.elementAt(i);
                hfm_forumselect new_forum = new hfm_forumselect(frm);
                mainManager.add(new_forum);
            }
    

    I wrote the code that allows to "highlight" the domain manager.

    Is there a way to 'read' the Manager added variables?

    For example, if I had a Variable called 'ID' within the hfm_forumselect... How I acceding that when sound highlighted on the main screen of the user interface...?

    Who is?

    You can add them to a datastructure, a vector, for example. When you add them. Or add the database instead. or you can use the container Manager, navigation using getFieldCount and getField (index).

  • Get the row index in a dynamic Table

    Hello gurus,

    How can I get the index of a line when it is added dynamically.

    Capture.PNG

    When the user clicks on the "-" he should get the index of the row on which he clicked the button.

    I tried using the code

    var var1 = (data. Design_page1. Working_times_subform. Working_Table.Row1.instanceManager.Count - 1);

    But it gives me the total number of lines. I want that the index of the particular line.

    Thank you.

    Kind regards

    Nikhil

    On the "-" button use this.parent.parent.index to get the index of the line, the button is in. the mention of 'parent' is used to back up the hierarchy so if you had say a subform around the button in the cell, you have to add another parent to learn Row1.

    In order to remove the line try: _Row1.removeInstance (this.parent.parent.index);

    Or it should work too: _Row1.removeInstance (Row1.index);

    The underscore character is a shortcut for the management authority. You can not use it in the object names, I'm sure it caused me problems in the past, I only use case for object names now (to avoid too many dashes).

    You don't need to specify the full path to the object that you are trying to access. The '-' button be Row1 can see Row1.

  • utility outlineload error - unrecognized column header value "Base currency"

    Outlineload.cmd/a: < app > U:admin /D:Entity /I:D:\Import\Entity.txt /L:D:\Import\Entity.log /X:D:\Import\Entity.exc

    That's what I see in my folder EXCEPT for the exceptions. However, I can't find anything wrong with the header of column value reference currency in the import of the entity file. Any suggestion greatly appeciated. I read through other messages that talk about the unrecognized header value column, but those that are specific to the column alias or in need of a space after the column, etc, I found nothing on the Base currency.

    The funny thing is that I exported dev and re same file imported to DEV without change, even after that, it's the same error I get. Clearly the application rejects the header value so that it can export the same thing.

    [Mar 29 23:59:32 EDT Apr 2014] Unrecognized column header value "Base currency".

    [Mar 29 23:59:32 EDT Apr 2014] Impossible to get analytical information and/or perform a data load: values of unrecognized column header, refer to previous messages. (Note: column header values are case sensitive.)

    [Mar 29 23:59:32 EDT Apr 2014] Planning of vector data store loaded with exceptions processes: records not all input have been read errors (or empty input file). 0 records were read, 0 data records have been processed, 0 were accepted for loading (check the actual load with Essbase logs), 0 were rejected.

    Hello

    you have a request for currency?

    If this is not the case, try to remove this column.

    Welcome them

    Kevin Kraft

  • How to access the values in column fron a report (region)

    Hello

    In the region of report footer section, I want to access the value of a column (e.g. name col = COL01) for first place. I know that I can access total number of rows using #TOTAL_ROWS #. Is it possible to do this?

    Thanks in advance,
    Paresh

    Hello

    I did not have a v2 to try this out, but try this:

    1. in your report, add the following in the header of the region:

    <div id="TheReport">
    

    2 - in the foot of the region:

    </div>
    <script type="text/javascript">
    var t = document.getElementById("TheReport");
    var r = t.getElementsByTagName("TABLE")[1];
    var rows = r.rows;
    var tds = rows[0].cells;
    var k;
    if (tds)
    {
     for (k = 0; k < tds.length; k++)
     {
      if (tds[k].id == 'ENAME')
      {
        alert(rows[1].cells[k].innerHTML);
      }
     }
    }
    </script>
    

    Remove your old javascript code and replace line alert() with all you need to do with the value of .cells [k] .innerHTML lines [1].

    This includes in your report in a div tag The JavaScript find it and gets the second table (the table report is a table of the area which is now within the DIV tag). As older versions of the Summit has not used the attribute "headers" on cells, we check the ID values for the column headings in row [0] - once we found the right column, we retrieve the corresponding value according to the data in row of lines [1].

    Andy

  • changing the value of text within a column of a PivotTable

    Hi people,

    I get great help from this forum and I am very frequently. This time, I have a question about Tables, how to manipulate fields in a table using JavaScript. The requirement is as follows, I have a Table (100rows x 3columns), and few of them are hidden in the page layout. The first column contains the values of text such as sequential numbers, (the first column is visual index, 1, 2, 3... 100). now, I'm trying to write a script that replaces or substitutes the first column values in the text areas of space. Can you guys help out me if you do a script? or give me some resources where I can manipulate the fields from the table using JavaScript?

    Thanks in advance.

    Hello

    It seems that the table is static and will always three rows during execution. In other words, the user cannot add more lines. If this correct?

    You need not resolve the nodes in this case, because you are referencing fields and specific lines.

    Because the script is located in the square, which is in the same container as the table, the following would erase the contents of the fields in the second column:

    Table1.Row1[1].TextField3.rawValue = null;
    

    Your script accesses an object in the second row called Cell1. This seems to be a text object has no property .rawValue If you want to change the value at run time, you will need to change this to a TextField object.

    In addition, looks like that is not an object in the second row (Row1 [1]) called "Cell1". It seems that the first object is unnamed. This will also cause the script to fail. When debugging, it is useful to use the JavaScript Console to see the (control + J) errors when previewing the form or in Acrobat.

    Who help me?

    Niall

  • Iterator binding: access the value of a column

    Hello

    Is there a way to access the value of a specific column from an af:table by EL, using the iterator binding? I know how to do this by adding an < attributeValues > affair in the pageDef file. But I'm just curious to know if it is possible without this 'thing '.

    For example, suppose we have a table, linked to a view object:
    <af:table id="t1" value="#{bindings.Employees1.collectionModel}" var="row" ...>
      <column headerText="Emp Id" id="c1" ...>
        <af:outputText value="#{row.EmployeeId}" id="ot1" .../>
      </column>
    </af:table>
    And below, a simple command button:
    <af:commandButton text="test button"/>
    Now, how can I set the disabled property of the CommandButton to be true, THAT when the selected row in the table has an EmployeeId of 200? So what I would do:
    <af:commandButton text="test button" 
    disabled="#{bindings.Employees1.collectionModel.currentRow.EmployeeId eq '200'}"/>
    But so far, I have not found the correct EL expression to do. I realize that it is quite an abstract example, but it is a concept that I need a lot, and I wonder what is the cleanest solution... :-)

    Thank you!

    Chris

    Published by: Chris Schryvers on December 1st, 2009 03:22

    Hi Chris,

    .... I use JDev 11.1.1.2.0...

    I have to do this:

    1. drag an EmployeeId (from your display in your dataControl) in the page as an outputText.
    2. make this false outputText visibility.
    3. in your Disabled property wirte commandButton control this EL:
    #{bindings. EmployeeId.inputValue is '200'}
    Or
    #{bindings. {EmployeeId.inputValue-eq ' 200'}.
    PartialTrigger 4-set of the outputText and the CommandButton with the table ID.

    your command button will be like this:


    ID = "cb1".
    Disabled = ' #{bindings. " EmployeeId.inputValue is '200'}'
    partialTriggers = "t1" / >

    Sameh Nassar

Maybe you are looking for