File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Don't get me started about those stupid light bulbs.
 
subject: Model update problem
 
Similar Threads
Please HELP me. How To Hard Code Values in Each Row of a dataTable?
Problem with h:dataTable
jsf controls in h:datatable
how to use TreeSelectionListener in a tree ?
h:commandLink and page Navigation