Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes Model update problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Model update problem" Watch "Model update problem" New topic
Author

Model update problem

Kris Kaz
Greenhorn

Joined: Jul 23, 2004
Posts: 2
Hi-

I'm running into a problem and it's driving me crazy. It seems to me that the solution should be so simple, but I'm obviously missing something. Hopefully someone can shed some light for me.

I have a jsp page that contains a dataTable which iterates through a collection of type list. Then for each record (row) in the dataTable, an output text, selectBooleanCheckbox, commandButton, and commandLink are displayed. The commandButton and commandLink are attached to an action method on my page code bean that should be called when the button is clicked.



My problem is this. When I click on either the button or text link, the form is reposted and my action is never called. I remedy this by setting the 'immediate' attribute to true so that I ensure the method is called right away. This causes another problem. The model is not updated by the time I get to my action method.

Am I missing something here? How can I make sure that the model is updated first and then the action is called.

Please help!

Thanks.
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Perhaps this thread can help you?


- Varun
 
 
subject: Model update problem