ADF editable table issue

Hi, I drag and drop an expert mode updatable VO to create an ADF editable table with inputText components associated with the table columns. This table is also binded to a CoreTable object inside the backing bean of the page. I also have a "Save" button which has actionLister binded to the backing bean to handle the saving for user's input data.
Basically, I have 2 rows and 2 columns for the editable table. I entered "ABC" for the first row and first column and entered "DEF" for the second row and first column like the following:
| Column 1 | Column 2 |
| ABC | |
| DEF | |
In the backing bean's saveChanges method, I do:
public void saveChanges(ActionEvent actionEvent) {
int rowCount = this.testCaseTable.getRowCount();
for (int i=0; i<rowCount; i++) {
JUCtrlValueBindingRef rowDef = (JUCtrlValueBindingRef)this.testCaseTable.getRowData(i);
TestCaseRowImpl row = (TestCaseRowImpl )rowDef.getRow();
System.out.println("Column1 Data: "+row.getColumn1());
System.out.println("Column2 Data: "+row.getColumn2());
I am expecting to get "ABC" for the first row column1 data and "DEF" for the second row column1 data. However, the actual result is both "DEF" (the last entered value) for both the first and second row column1 data.
What can be the potential issues of my codes? How can I get the correct user input data?
Thanks.

Hi
You can obtain this data from iterator:
DCBindingContainer bc = getBindings()
DCIteratorBinding iter = bc.get("YourIteratorNameIterator");
while(iter.hasNext()){
Row row = iter.next()
System.out.println("Column1 Data: "+row.getAttribute("Column1"));
System.out.println("Column2 Data: "+row.getColumn2("Column2"));
Kuba

Similar Messages

  • ADF Editable Table : CANNOT Insert Multi Rows , Please hellppppssss

    Hi All,
    Our customer requirement is being able to insert Multi Rows in an Editable Table and submit ALL of them with just one Click ?
    Is it Really Possible ?
    I have tried, even I can insert three Empty Rows and Fill them all with values, when I press Submit ONLY one row will be submitted, the other TWO will become BLANK again, is this my code is wrong ?
    Or this is limitation of ADF Editable Table ?
    Here is my codes, I have tried two ways, all same problem :
    (1) public String create_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("Create");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    public String myCreate_action() {
    create_action();
    create_action();
    create_action();
    return null;
    (2) public String createMultiRows() {
    DCBindingContainer dcbc = (DCBindingContainer)getBindings();
    //get iterator binding
    DCIteratorBinding ib = (DCIteratorBinding)dcbc.get("DeptView1Iterator");
    // get viewobject
    ViewObject vo = ib.getViewObject();
    System.out.println(vo.getCurrentRowIndex());
    vo.clearCache();
    int currentRowIndex = vo.getRowCount() -1;
    Row row1 = vo.createRow();
    row1.setNewRowState(Row.STATUS_NEW);
    vo.insertRowAtRangeIndex(++currentRowIndex, row1);
    Row row2 = vo.createRow();
    row2.setNewRowState(Row.STATUS_NEW);
    vo.insertRow(row2);
    Row row3 = vo.createRow();
    row3.setNewRowState(Row.STATUS_NEW);
    vo.insertRow(row3);
    return null;
    Please help... I am stuck ...
    Thank you very much,
    xtanto

    Xtanto,
    Could you try changing
    bindings.getOperationBinding("Create");to
    bindings.getOperationBinding("CreateInsert");in your first example to see if it fixes your problem?
    Regards,
    John

  • How to add boolean ckeck box to adf editable table

    I have ADF editable table
    this table containt EmployeeName , EmployeeID , and EmployeeStatus
    the status is (A,I) Active or Inactive
    the field in the database is Varchar2(1)
    i want to make check box to be checked when the emp is active and unchecked when the emp is inactive and the value is (A,I)

    duplicate... answered [url http://forums.oracle.com/forums/thread.jspa?threadID=1056067]here

  • URGENT: ADF Faces table updating issue.

    I have a project that uses JSF, ADF Faces, EJB 3.0, and the ADF binding framework.
    In this project, I have a page with a databound ADF Faces Table. The table has a number of read-only columns and two read-write columns. I also have an Edit button that allows the user to pop up a dialog box to edit the selected row of the table. When the user clicks OK in the dialog box, the data is passed back to the main page and the table is updated.
    Everything works correctly for the read-only columns. For the read-write columns, however, the table data does not get updated following an edit. This is what I have found:
    1. The table row data gets passed in to the Edit dialog correctly.
    2. The data gets passed back correctly.
    3. The model gets updated correctly (up to and including the database).
    4. Looking at the iterator in the debugger shows the correct, updated data.
    5. When the table row is getting redrawn, the getter calls for the read-write columns return the updated data.
    6. As mentioned above, the read-only columns get updated correctly.
    7. Updating the read-write columns directly from the table works correctly.
    So, the problem appears to be in the GUI layer. I suspect that, somehow, the submitted values of the read-write columns are not getting set properly, but I cannot figure out how to do this.
    Note that clicking on the Edit button results in a partial submit. In the return listener, I add a call to AdfFacesContext.getCurrentInstance().addPartialTarget(getRecipientTable()) in order to redraw the table (getRecipientTable() is the bound value of the ADF table).
    Please help! We are so close to production and we need to fix this.
    Thanks,
    Ara

    Hi,
    I don't have a testcase for this, so I just come up with ideas to try
    1. refresh the parent container of the table. It seems that the input text components are not triggered to refresh if the refresh is on the table.
    2. If using ADF, make sure the update is performed directly on theiterator (which automatically is the case if you use a ADF bound form for this)
    3. Check if executing the table iterator and then setting back the current row makes a difference
    Frank

  • How to create an editable table in ADF 10g??

    Hi,
    I want to create a editable table using the Jdev 10g.. so that i can do read and write on the table. Can anyone tell me how i can create it...
    thanks in advance

    Hi,
    using ADF BC and ADF, one of the options when dragging a ViewObject from the data control palette is ADF Table. This creates an updateable table
    Frank

  • ADF Faces Dependent list boxes in an editable table

    Hi,
    I'm working with JDeveloper 10.1.3.1.0.
    I saw the topic "How to build dependent list boxes with ADF II" on F. Nimphius' Blogbuster.
    There it is shown how to handle dependent list boxes in an ADF Faces form. I tried this for an editable table but it doesn't work correctly: If there is more than one row in the resultset of the table, both dependent list boxes have the same content in all the rows though the content in the database is different.
    Can anyone help me?
    Thanks.

    Ok - I will try.
    I built the listboxes like it is described in "ADF Faces: How to built dependent lists boxes with ADF and ADF Faces Part II", Frank Nimphius' Blogbuster July, 2006.
    This is the full code of my ManagedBean:
    package asdb.view.backing;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.OperationBinding;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.binding.BindingContainer;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.uicli.binding.JUCtrlValueBindingRef;
    public class AktMitFktEdit {
    private BindingContainer bindings;
    public AktMitFktEdit() {
    public void kategorieWechsel(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bc = this.getBindings();
    DCIteratorBinding kategorienIter = (DCIteratorBinding)
    bc.get("OrganKategIterator1");
    Row rw =
    kategorienIter.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    String kategorie = (String)rw.getAttribute("Kategorie");
    OperationBinding opBindingOrganeLovIter = (OperationBinding)bc.get("ExecuteWithParams");
    opBindingOrganeLovIter.getParamsMap().put("kategorieParam",kategorie);
    opBindingOrganeLovIter.execute();
    public void setBindings(BindingContainer bindings)
    this.bindings = bindings;
    public BindingContainer getBindings() {
    return bindings;
    It works fine, when the user only want to update existing rows. But if he had inserted a new row and afterwards want to update existing rows, the listboxes don't show the correct contents. No error messages are displayed.

  • ADF Master Form / Detail editable table : how to update the table ?

    Hello,
    I'm using ADF faces with entity objects.
    Here is a simple explanation of the model :
    Table DOCUMENT --> Table LINEA DOCUMENT can have 0 or several row in the LINE table. Model is quite simple.
    I'd like to create JSF pages to create and update DOCUMENT/LINE items.
    I began with the Edit one :
    In my DataControls I have something like :
    AllDocuments
    |
    +- Id
    |
    +- Name
    |
    +-> AllDocumentLines
          |
          +- IdLine
          |
          +- ValueI created a form with the "AllDocuments" items having navigation and submit button.
    I created an editable table with "AllDocumentLines" items.
    The values are correctly filled.
    My questions are :
    - Which kind of "button" I have to add at the end of each row of the table to :
    * validate the update if "Value" changes ? I tried to drag/drop the related Create button but it stays disabled.
    * delete the row
    - Which button can I put to "Add" a new row ?
    I searched the forum but can't find answers of my problem.
    Edit: I'm using JDeveloper 11.1.1.3.0
    Edited by: Christophe on Jul 2, 2010 5:12 PM

    For creating a record drag the createInsert operation and for delete drag the delete operation - just make sure to drag the operation from the right VO in the data control palette.
    The you can drag the commit and rollback operations from the AM level - and you can change the "Disabled" properties of the buttons to false.

  • ADF data table with Add,Edit,Delete functionality

    Hi Experts,
    I have a adf page where I need to implement add,edit,delete button. The table was bind with the Webservice obj call.I need to have one single button as "Add" which should add an inline row at end of the table.When I ll double click on the row I should have the in-line edit of the row.And for delete functionality,there should be delete button on each row which should delete the correspond row.Please help me to solve my problem.Please share the code to meif u ve any.my email: [email protected]
    Thanx
    Aswini

    Can you check the below links
    http://andrejusb.blogspot.com/2010/05/crud-operations-in-oracle-adf-11g-table.html
    http://andrejusb.blogspot.com/2009/11/crud-operations-in-jdeveloperadf-11g-r1.html
    ~Abhijit

  • Adf Readonly table to Editable

    Hi All
    I am using JDev 9.0.5.2. I need an editable table from an adf viewobject. Here is what I do:
    1. I create a view.
    2. On my jsp page I drag a readonly table from my data controls onto the page. There is no editable table option in this version of Jdev.
    3.I drag a create button onto the jsp page.
    Problem
    When I hit create, nothing happens.
    I go to the Ui Model to have a look at the action for the create button and its action is set to create. There are a list of other actions that can be assigned to this button but there is no insert or new action.
    Can anyone help with this
    Thanks

    Hi,
    open the Create action and set it to CreateInsert to create a new record. Note that you have to navigate to a page that has an editable form based on the VO
    Frank

  • 1.5PROD/EA3/EA2 - Issues removing indexed column through Edit Table dialog

    The Edit Table dialog does not cope well with removing a column which is used in indexes.
    If you simply remove the column and hit OK, you get a Validation Failed error saying that "Column <column> is not a column of table <table>". Given that you are trying to remove the column, this is confusing.
    Most times, you can navigate to the indexes but the column no longer shows in the index which contained (and all other columns in the index appear to be removed as well). At least you can remove the index and then accept the change. However, some times (couldn't reproduce consistently), the index didn't display properly (no name displayed) and I couldn't leave the record without entering a dummy name before removing it.
    Shouldn't the behaviour be equivalent to the "corresponding" alter table drop column command which automatically drops the indexes referring to the dropped column? I know that it isn't always nice to "silently" remove an index or indexes, but couldn't we display a dialog that indicates which indexes we are going to drop to warn the user?
    theFurryOne

    No response to this, but it is still a problem in EA3.
    I assume it is not intended that you cannot drop an indexed column through the Edit Table dialog, without having to first drop the index - it is certainly not required in direct SQL and the Drop Column via the Table context menu works as well (as that simply generates the SQL).
    theFurryOne

  • ADF Tree table is not exapanding

    Hi all,
    I have to implement an ADF tree table along with a form. I have three Views,
    two of the views are used to populate the Tree table, And one of the view used in the Tree population is used to manipualte the form,
    And the third one is to populate a table. And I have a Popup call button in the same panelCollection where the tree table is placed
    I am facing two issues with the the tree table.
    1. The tree table is not expanding, if I click on the '+' on the node it won't expand and it will show me small circle which is trying to open the node.
    But if I click on the Popup button and cancel(RollBack) the popup and come to the node, it will exapand. I don't kow why it is....
    2. As I said I have a Form and I have to populate the form based on the selection in the tree table nodes, the form filed is same as that of the view used to populate the Tree table view.
    But when i click on the tree table nodes it is not chaning the record according to the selection in the tree nodes. But in a master Detail form it is working fine. It is always pointing to the first record.
    Please help.....

    No vinod, I am not getting any kind of exceptions..
    And mY tree table is
    <af:treeTable value="#{bindings.TestVO.treeModel}"
    var="node"
    selectionListener="#{backingBeanScope.TestBean.TreeTableSelectionListener}"
    rowSelection="single" id="tt1"
    columnStretching="column:c1" contentDelivery="immediate"
    binding="#{backingBeanScope.TestBean.tt1}">
    <f:facet name="nodeStamp">
    <af:column id="c1">
    <af:panelGroupLayout id="pgl15">
    <af:outputText value="#{node.SubtaskDesc}" id="ot1"/>
    <af:outputText value="#{node.HazardDesc}" id="ot4"/>
    </af:panelGroupLayout>
    </af:column>
    </f:facet>
    <f:facet name="pathStamp">
    <af:outputText value="#{node}" id="ot2"/>
    </f:facet>
    <af:column id="c2">
    <af:outputText value="#{node.MaxRiskRating}" id="ot3"/>
    </af:column>
    </af:treeTable>
    Edited by: Ranjith C on Jul 18, 2011 6:21 AM

  • 30EA3 - Edit Table/Create Table(Advanced) - Table Name, Text Box Size

    I am not sure if its the same on non-Linux versions, but in the edit table dialog, the table name text box size is tiny. Its only wide enough that you can see approx 7 chars.
    Is it possible to increase this? The size of the text box in the simple create table dialog seems like a good size. As far as I can tell, it is not tiny to conserve space for other items.
    Anyway, it's just a minor issue that wont prevent me from doing work - just think it'd be better a bit bigger. I am sure it didn't used to be this small.
    Ta,
    Trent

    oh interesting.
    are you using openJDK?
    $ /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version
    java version "1.6.0_22"
    Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
    Ta,
    Trent

  • ADF Tree Table Repeats Elements at All Levels in nodeStamp Facet

    Fusion Middleware Version: 11.1.1.5
    WebLogic: 10.3.5.0
    JDeveloper Build: Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013
    Project: Custom WebCenter Portal Application integrated with custom ADF task flows.
    Hi
    I have an issue with ADF Tree Table (af:treeTable) whereby if I add a component to a group under the 'nodeStamp' facet it repeats for all levels in the tree even those outside the group.
    Overview:
    - 3-level master-detail structure created using ADF Business Components (3 view objects connected by 2 view links)
    - ADF Tree Table based on master-detail
    - Requirement to show 3 levels of data in the first column as a tree
    - Tree table is rendering correctly showing values for 'node.FullName', 'node.DisplayValue' and 'node.HoursType' respectively in a 3 level tree.
    - When another component is added to the top node in the tree ('node.FullName') for example some output text ('node.TimeBuildingBlockId'), it is displayed along side components 'node.DisplayValue' and 'node.HoursType' as well.
    Code snippet:
          <af:treeTable value="#{bindings.PerPeopleFVO1.treeModel}" var="node"
                        selectionListener="#{bindings.PerPeopleFVO1.treeModel.makeCurrent}"
                        rowSelection="single" id="tt1" styleClass="AFStretchWidth"
                        horizontalGridVisible="true" verticalGridVisible="true"
                        disableColumnReordering="true" summary="Timecard Entry"
                        displayRow="selected" expandAllEnabled="false"
                        contentDelivery="immediate" autoHeightRows="24"
                        columnStretching="column:column1"
                        binding="#{pageFlowScope.TimecardMB.tree_binding}">
            <f:facet name="nodeStamp">
              <af:column id="c1" headerText="Partner Details" width="500">
                <af:group id="g4">
                  <af:outputText value="#{node.FullName}" id="ot3"/>
                  <af:outputText value="#{node.TimeBuildingBlockId}" id="ot1"/>
                </af:group>
                <af:outputText value="#{node.DisplayValue}" id="ot4"
                                inlineStyle="color:Green; font-weight:bolder;"/>
               <af:outputText value="#{node.HoursType}" id="ot5"/>
                <f:facet name="filter"/>
              </af:column>
            </f:facet>
            <f:facet name="pathStamp">
              <af:outputText value="#{node}" id="ot2"/>
            </f:facet>
       <af:column FROM HERE.........>
    Any ideas greatly appreciated.

    Hi,
    Try using a switcher to distinguish all three levels of a tree. You can have three different facets, three different af:group 's.
    When you add in one level, it will not repeat in the other level.
    Please see the below snippet.
    <af:tree value="#{bindings.RefBusinessUnitView1.treeModel}" var="node"
    selectionListener="#{bindings.RefBusinessUnitView1.treeModel.makeCurrent}"
    rowSelection="single" id="t1">
    <f:facet name="nodeStamp">
    <af:group id="g1">
    <af:switcher id="s1"
    facetName="#{node.hierTypeBinding.viewDefName}">
    <f:facet name="model.RefBusinessUnitView">
    <af:group id="g2">       
    <af:outputText value="#{node.Code}" id="ot1"/>
    </af:group>
    </f:facet>
    <f:facet name="model.RefProductFamilyView">
    <af:group id="g3">
    <af:outputText value="#{node.ProductFamilyName}" id="outputText1"/>
    <af:outputText value="#{node.PName}" id="outputText2"/>
    </af:group>
    </f:facet>
    </af:switcher>
    </af:group>
    </f:facet>
    </af:tree>
    Nitish

  • Inserting Rows in an Editable Table

    Application Focus: JSF with ADF/BC.
    watching Steve Muench´s Screencast on "Creating an Editable Table with a Dropdown List in Each Row" i was inspired to add a functionality to add rows.
    Lets say i have an Employee and Departments table. If i want to add three new employees in the employee editable table - that wont work - it seems that adding rows aint that simple, cause it seems not possible to commit more than one row at a time
    what i did according to forum posts and how-to´s:
    1. dropped "insert" from data control palette
    2. altered binding to from create to "CreateInsert"
    works ok, but if i press the button twice (3x, 4x) the new rows are shown, but if i commit them, only one is in the database?
    Any tips on that would be appreciated.

    I'm trying to a similar thing, create an input screen that allows you to add muliple rows at the same time some rows having a drop down list. I've read the following How to which lets me edit multiple rows but if I add a create button or a CreateInsert button it doesnt seem to give me rows to create.
    How To Create Multi Row Edit Forms in a JSP Page with Oracle JDeveloper 10g
    http://www.oracle.com/technology/products/jdev/tips/mills/JSP_Multi_Row_Edits.html

  • Using the enter key on an editable table

    Hi,
    I'm using 11g adf and I can't figure out how to get past this:
    When going through an editable table (with editingMode="editAll") using the enter key, it will stop after a certain number of rows, equal to the value of fetchSize. If I want to go down further, I have to scroll down another way to make it fetch the next set of rows, it won't go to the next row with the enter key. It simply won't execute the query to fetch the next rows.
    Increasing the fetchSize will just delay the problem to a row further down (and decrease the performance since the fetch operation can take quite a bit longer).
    I've tried to put a clientListener on both the table or the inputText fields to intercept the enter key, but that won't work when the table is in editable mode.
    Is there any way to fix this problem?

    Hi,
    I've tried to put a clientListener on both the table or the inputText fields to intercept the enter key, but that won't work when the table is in editable mode.
    The clientListener needs to be on the inputText fields. Then in JS you need to call a server listener which will check if the current row is already at the range end and if calls NextSet (you can provide this as a method binding). Unfortunately after this you will need to PPR the table to show the new rows. This is how I would try it.
    Frank

Maybe you are looking for