This discussion is archived
1 Reply Latest reply: Jan 27, 2013 12:12 PM by EonvanTonder RSS

Add/Update data from input text boxes into an adf table

970545 Newbie
Currently Being Moderated
Hi,
This is Nishant. I am facing a problem while doing some coding stuffs for my project using oracle adf. I am using JDev 11.1.1.5.0. My requirement is as follows.

1. I have 5 input text boxes, an add button, an update button and a ADF table with 5 columns.
2. My requirement is to add the data in the input text boxes into the adf table as a row at runtime when the add button is clicked.
4. In the next page, this table will come auto populated with the rows added in the previous page.
5. When I click any 1 of the rows, the data in the row should get populated in the 5 input boxes above, enabling me to edit the data.
6. And then when I click on update button, this selected row should be updated with changed values.

In my scenario, I will not be having any data control. I will be using a managed bean for my actions and table data will be stored in a list, with the list type being a class which contains 5 variables and their setter and getter. These 5 variables are the 5 columns of the table.
  • 1. Re: Add/Update data from input text boxes into an adf table
    EonvanTonder Explorer
    Currently Being Moderated
    Hi Nishant,

    The adf table component accepts plain java collections as a collectionmodel so you can easily implement your requirement with your list of objects. I would suggest you put your list in a managed bean with pageFlow scope (if you are using taskflows) which will also help with your requirement to edit it in another page.
    967542 wrote:
    5. When I click any 1 of the rows, the data in the row should get populated in the 5 input boxes above, enabling me to edit the data.
    You can provide your own selectionListener in adf table to do this. The selectionEvent will return the index of the row so you can just do a list.get(index) and display/apply changes to that row. Remember to PPR the fields if you want the UI to refresh with the selected data.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points