I'm trying to solve a problem which I would seem to think is quite intuitive to solve but just can't seem to get it going. Any suggestions you can offer would be greatly appreciated.
Basically, I have a managed bean in the request scope which contains a List<String>.
I create a datatable (actually its a RichFaces datatable) which iterates through the List above and creates an input text field for every entry. My problem is when I submit the form, the List in the managed bean is not updated and remains empty. I'm completely at a loss as to how to make this work. I've even tried binding the table to a back bean and iterating through the children of the HtmlDataTable object with no success. To make sure I am understanding things properly, I even added a simple input text field outside the datatable to make sure it was properly submitted.
The duplicate ID is just a spelling error. Putting the managed bean in session scope definately makes things easier. In the request scope though it is possible to make it work. I ended up getting the behaviour I want by accessing the parameter map in the HttpServletRequest and then manually populating the List. I'm guessing there isn't inherent support in the datatable for restoring a property of type List as the property's setter method is never even invoked.