How to add rows (with data) to a simple table

Hi,

I would like to know how to add rows to a CAF (7.1.1) table.

This is what I been able to do:

1.Right click on the desire document list on Binding View → Managed Bean → Business data and selected “New Content Provider

Hi,

Were you able to get this working? I am having a similar problem. When I am in the debug mode, I can see that the rows added are visible in the Provider.array. But the Provider array when it is bound to input of another service, it just does not do the data binding.

I have followed the same steps as you have.

Thanks,

Hi,

Instead of using AddRow Button, take a Command Button and bind it an Action. Inside the Action to create a row call
“.createRow()”.

After creating a row u can set the value by using
“.setValue(”",value)".

Hope this ll help.

Regards,
Sunil Kumar N

Hi,
one other option you have is to create an action and bind it to the “Before Row Created Action” in your Table Content Provider. In that action you will initialize the contents of the created row (simplest way, if possible, using the Data Flow wizard… see the attached pic). This action will be called:

  • inmediately if you used the “Create Row” action, as described by Sunil
  • when another action is called in case you used the client side “Add Row Button” control.

hope this helps,
Javier

I’ve followed the example trying to implemement the “add row” logic via a Java action.
It works, the only problem is that when I first click on the button, the provider is refreshed, a new row is created but the row is not displayed.
On the second click, one row appears, the first has disappeared. Starting the server in debug mode, the provider on the second click does not contains any row.

Tha’t quite annoying, does anybody knows how to solve it?

Thank you very much.

Include “Add Row Button/Icon/Link” from pallete in your table to achieve the same functionality