[jsr-314-open-mirror] [jsr-314-open] Fix UIData state saving model (issue 153)

Martin Marinschek mmarinschek at apache.org
Tue May 25 08:57:04 EDT 2010


Hi Leonardo,

ok

> If we have some code on UIData.markInitialState() we have to call
> clearInitialState
> on all children, save the component initial state and call again
> markInitialState. The
> idea behind do not call UIComponent.markInitialState() on
> ComponentTagHandlerDelegate,
> is in avoid do that in reverse order and just do it in one step.

well, you need to have all children constructed, when
markInitialState() is called on the table, right? Is that what it
boils down to?


> on the state. The code proposed additionally save and restore the delta, and
> the
> delta per row is saved on UIData state.

ok

>
>> By the way - I don´t like Alexander´s idea of having a
>> restoreRowState/saveRowState (this additional API would only be useful
>> inside repeater-components). Instead, I would propagate a
>> getTransientAttributesMap() API, and the repeating-component would
>> just take care of saving/restoring this as well. I believe this API
>> could be used for a lot of other stuff. It would essentially a
>> component-request scope, which we don´t have yet, and for which we had
>> quite a few usages in cs-JSF already.
>>
>> We could also embed this state in the stateMap with a transient=true
>> attribute, that´s the other option - then it won´t be a public API
>> however.
>>
>>
> The important here is provide methods to save and restore that map/variable
> set.
> As long as we have some way to do that, we could call it from
> UIData.setRowIndex. I like the idea to extend StateHelper with accesors
> and save/restore methods for transient components.

I agree.

Can we add this to our JSF 2.1 roadmap?

best regards,

Martin




More information about the jsr-314-open-mirror mailing list