This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
I have the problem, that I am using a dataTable from tomahawk for iterating an List:
The update I made in the inputtext is not represented in the List.
What is the problem, when I save with the button, that my object model is not filled (by using setters) ?
In Debug mode I can see that a new instance is using my setters.
Therefore the different instances causes the problem, that I have to use the binding.
Any explaination for me?
Because I didn't find an answer for my question, I tried to use a binding as mentioned above.
But there is no updated data in the List. Can anyone help me?
You need to access the 'populatedFoos' property in the action method. The updated model values are in there. You should also rather populate the list in the constructor of the backing bean. A getter can be called more than once in bean's life and is in fact solely intented to return a bean property, not to do some (non-lazy) loading actions. After all you need to ensure that the same list is constructed during the apply request values phase of the subsequent request as it was during the render response phase of the initial request. If the bean is request scoped (good choice) and you want to prevent the datamodel being loaded everytime, you can use preserveDataModel attribute of the t:dataTable for this.
I am using the session scope, and when I check the 'popultedFoos' Variable, no update is made after clicking the save button.
In the updatedFooList there is also the old value...
I don't know where the problem is located.
Joined: Feb 10, 2009
ok, everything works with an List. I thought i am using a list for my value in the datatable.
But it was a map. (values of map) which has shown me the data, but couldn't use any setter at the storing process...