• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Model update problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps this thread can help you?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic