Yeah, I had thought that was the problem, that's I why I switched to
ReuseIfModelsEqualStrategy (actually, a custom impl based upon that class
because I could figure out how to use a custom model for the cells;
AbstractDataGridView.getPopulatorsIterator is private and it doesn't supply
an overridable method to wrap the object in a Model and Model doesn't
delegate equals/hashCode to the modelObject, but I digress...).  The main
difference is that my impl uses the modelObject, not the model as the Map
key.  I can verify that I am returning the oldItem from the
IItemReuseStrategy.getItems() method.  

What else should I be verifying?  Could this have anything to do with
RefreshingView.internalOnAttach() doing a removeAll() then addItems(). 
Could the removeAll be disconnecting the component from the user entered
data? before it gets re-rendered?  I'm just shooting in the dark here
because I don't think I fully understand the underlying processing.

Chuck


igor.vaynberg wrote:
> 
> your model reuse strategy must not be working correctly.
> 
> the input values are lost because they bound to the component, and if that
> component is recreated by the repeater they are then gone. thus the
> disappearing values.
> 
> -igor
> 
> 
> On 4/26/07, ChuckDeal <[EMAIL PROTECTED]> wrote:
>>
>>
>> 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
>>
> 
> -------------------------------------------------------------------------
> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/reloading-a-DataTable-after-submit-with-validation-error-tf3653176.html#a10206546
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