Hi Martin<br><br><div class="gmail_quote">2010/5/25 Martin Marinschek <span dir="ltr">&lt;<a href="mailto:mmarinschek@apache.org">mmarinschek@apache.org</a>&gt;</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>
&gt; If we have some code on UIData.markInitialState() we have to call<br>
&gt; clearInitialState<br>
&gt; on all children, save the component initial state and call again<br>
&gt; markInitialState. The<br>
&gt; idea behind do not call UIComponent.markInitialState() on<br>
&gt; ComponentTagHandlerDelegate,<br>
&gt; 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>
&gt; on the state. The code proposed additionally save and restore the delta, and<br>
&gt; the<br>
&gt; delta per row is saved on UIData state.<br>
<br>
</div>ok<br>
<div class="im"><br>
&gt;<br>
&gt;&gt; By the way - I donīt like Alexanderīs idea of having a<br>
&gt;&gt; restoreRowState/saveRowState (this additional API would only be useful<br>
&gt;&gt; inside repeater-components). Instead, I would propagate a<br>
&gt;&gt; getTransientAttributesMap() API, and the repeating-component would<br>
&gt;&gt; just take care of saving/restoring this as well. I believe this API<br>
&gt;&gt; could be used for a lot of other stuff. It would essentially a<br>
&gt;&gt; component-request scope, which we donīt have yet, and for which we had<br>
&gt;&gt; quite a few usages in cs-JSF already.<br>
&gt;&gt;<br>
&gt;&gt; We could also embed this state in the stateMap with a transient=true<br>
&gt;&gt; attribute, thatīs the other option - then it wonīt be a public API<br>
&gt;&gt; however.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; The important here is provide methods to save and restore that map/variable<br>
&gt; set.<br>
&gt; As long as we have some way to do that, we could call it from<br>
&gt; UIData.setRowIndex. I like the idea to extend StateHelper with accesors<br>
&gt; 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>