Within a form I'm using a detachable model for a ListView that contains business objects loaded directly via JDBC, each of which has a selected flag, rendered in the ListItem as a checkbox. However, when I get to onSubmit in the form, the model is still detached, and therefore the state hasn't been transferred from the form to the model. Therefore, when it renders, it reattaches but the model hasn't changed. What is the best way to fix this? In onSubmit I'd like to delete the records. The reason I use a detachable model is I want each render to have fresh results from the database via JDBC, but perhaps is there is better way? I haven't set optimizedItemRemoval to true because I don't need anything to be validated. Thanks

On 2005-08-16 23:48:08 -0600, Eelco Hillenius <[EMAIL PROTECTED]> said:
Note that if you are using detachable models (e.g. your list), if you don't do anything in the form's submit method (like persisting your changes), the next time the list renders it will use the same old value, which could give you the idea nothing happened.





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to