This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
Thanks for the input.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com