On my page, I use a DataTable with custom IColumn implementtions that use
fragments to make the cells editable.  If I change that values in the cells
and click submit (which just submits the Form object) then it preoperly
persists my data and refreshes with the correct data when there are no
validation problems.  If I attempt to submit but there is a validation
problem, then the DataTable cells reset back to their original values.  This
is unlike a TextField that is directly on the Form which would retain the
last entered value.  

I'm trying to understand the difference between the two scenarios.  I
believe it has something to do with DataTable creating new Items on each
render.  I even tried to use ReuseIfModelsEqualStrategy, which I verified
was returning the the existing object versus creating a new one.  But it
still did not persist the user-entered values, because the model wasn't
getting updated (as I expected since the validation failed).

I may not fully understand how wicket "redraws" the screen after a
validation failure in which the components do not update their models, yet
are able to display the last user entered value.  Perhaps some insight into
that might make me understand where I've gone wrong.

Chuck
-- 
View this message in context: 
http://www.nabble.com/reloading-a-DataTable-after-submit-with-validation-error-tf3653176.html#a10205480
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to