Hi Martin<br><br><div class="gmail_quote">2010/5/25 Martin Marinschek <span dir="ltr"><<a href="mailto:mmarinschek@apache.org">mmarinschek@apache.org</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Leonardo,<br>
<br>
ok<br>
<div class="im"><br>
> If we have some code on UIData.markInitialState() we have to call<br>
> clearInitialState<br>
> on all children, save the component initial state and call again<br>
> markInitialState. The<br>
> idea behind do not call UIComponent.markInitialState() on<br>
> ComponentTagHandlerDelegate,<br>
> is in avoid do that in reverse order and just do it in one step.<br>
<br>
</div>well, you need to have all children constructed, when<br>
markInitialState() is called on the table, right? Is that what it<br>
boils down to?<br>
<div class="im"><br></div></blockquote><div><br>When markInitialState() is called on the table, we need to save the state of all children<br>inside the table component. Later, when UIData.setRowIndex is called we use that<br>
information to restore the initial state first of each component and then apply the delta.<br><br>Right now, when markInitialState() is called on the table, all children inside the table has<br>been already marked, so we need to call clearInitialState() on all children, then call saveState()<br>
to get the required information and then call again markInitialState().<br><br>I tried to find an alternative to not traverse the tree calling markInitialState() as suggested, <br>and use something different like a listener to PostAddToViewEvent, but I found that it will not<br>
work, because it is possible to create a tag that add some attached object to a component<br>on this event (for example: t:autoScrollPage).<br><br>regards,<br><br>Leonardo Uribe<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
<br>
> on the state. The code proposed additionally save and restore the delta, and<br>
> the<br>
> delta per row is saved on UIData state.<br>
<br>
</div>ok<br>
<div class="im"><br>
><br>
>> By the way - I donīt like Alexanderīs idea of having a<br>
>> restoreRowState/saveRowState (this additional API would only be useful<br>
>> inside repeater-components). Instead, I would propagate a<br>
>> getTransientAttributesMap() API, and the repeating-component would<br>
>> just take care of saving/restoring this as well. I believe this API<br>
>> could be used for a lot of other stuff. It would essentially a<br>
>> component-request scope, which we donīt have yet, and for which we had<br>
>> quite a few usages in cs-JSF already.<br>
>><br>
>> We could also embed this state in the stateMap with a transient=true<br>
>> attribute, thatīs the other option - then it wonīt be a public API<br>
>> however.<br>
>><br>
>><br>
> The important here is provide methods to save and restore that map/variable<br>
> set.<br>
> As long as we have some way to do that, we could call it from<br>
> UIData.setRowIndex. I like the idea to extend StateHelper with accesors<br>
> and save/restore methods for transient components.<br>
<br>
</div>I agree.<br>
<br>
Can we add this to our JSF 2.1 roadmap?<br>
<br>
best regards,<br>
<font color="#888888"><br>
Martin<br>
</font></blockquote></div><br>