File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Model update problem

Kris Kaz

Joined: Jul 23, 2004
Posts: 2

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!

Varun Khanna
Ranch Hand

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

- Varun
I agree. Here's the link:
subject: Model update problem
It's not a secret anymore!