Martin,
why do you get Page instance 2 on page refresh?
MartinM wrote:
>
>> please describe the context. I don't see how the process of serialization
>> makes the instance of the object obsolete.
>
> 1. Page instantiation. Page instance 1 {manipulating target data 1},
> formComponent instance 1->target data instance 1.
> 2. Ajax request or similar onto page.
> 3. Page refresh (deserialized from diskstore). Page instance 2
> {manipulating target data instance 2}, reused formComponent instance
> 1->target data instance 1.
>
> So in stage 3 the page is manipulating target data instance 2 while
> the reused form components still manipulate target data instance 1.
>
> What this means? It means that for example if you Submit form, the
> values will be updated onto target data 1. The mistake is that if your
> Page instance 2 handles saving procedure, it will save the target data
> {2} which does not receive the form submit.
>
> This might work differently with detached models. I do not bother with
> detached models on lightweight models.
>
> **
> Martin
>
>>
>> MartinM wrote:
>>>
>>> Hi!
>>>
>>> I am having trouble with listView.setReuseitems(true).
>>>
>>> My problem is that
>>> 1. on first request the listview creates form components.
>>> 2. on second (or third ...) request the listView reuses the form
>>> components.
>>> 3. however, the propertymodels attached to the formcomponents at 1 are
>>> no longer viable, because their target objects are only the orignal
>>> serialization copies. In state 2 or 3 the form components now update
>>> totally obsolete instances of the target objects .
>>>
>>> A better strategy would probably be to just copy the rawInput states
>>> of the formComponents instead of really reusing the components.
>>>
>>> Comments, anybody? Did I misunderstand something? I have been
>>> debugging this for 6 hours now, maybe my brain melted down already. ..
>>>
>>> **
>>> Martin
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/reuseitems-problems-tp24702133p24704253.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/reuseitems-problems-tp24702133p24705518.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]