that should be handled by the list items model
Override the ListView.getListItemModel() and give youre own implemantation (detachable model for youre db object just store the pk)
and when that model get's attached it will try to lookup the object for that pk. If that is deleted then the calling code should handle that
(with an exception or just redirect to the list page again with a feedback message "object was already deleted")

So that handling should be done in the Link.onClick() or Form.onSubmit(). when the model object returned null.

johan


On 10/28/05, Robert McClay <[EMAIL PROTECTED]> wrote:
What is the best way to reconcile items in a ListView when the
underlying records have been deleted by another user just prior to a
form submit? Should I override beforeUpdateFormComponentModels,
reattach my model, iterate through my ListItem models and determine if
the primary key associated with each ListItem model exists in my fresh
model, and then call ListView.remove() on missing items? Otherwise I
get IndexOutOfBoundsException when the ListItem model attempts to
reattach itself to a row that no longer exists in the List.

Is there a better way to handle this? Thanks.




-------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to