<br><br><div class="gmail_quote">2010/5/26 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;">
<div class="im">&gt;&gt; well, you need to have all children constructed, when<br>
&gt;&gt; markInitialState() is called on the table, right? Is that what it<br>
&gt;&gt; boils down to?<br>
&gt;&gt;<br>
&gt;<br>
&gt; When markInitialState() is called on the table, we need to save the state of<br>
&gt; all children<br>
&gt; inside the table component. Later, when UIData.setRowIndex is called we use<br>
&gt; that<br>
&gt; information to restore the initial state first of each component and then<br>
&gt; apply the delta.<br>
&gt;<br>
&gt; Right now, when markInitialState() is called on the table, all children<br>
&gt; inside the table has<br>
&gt; been already marked, so we need to call clearInitialState() on all children,<br>
&gt; then call saveState()<br>
&gt; to get the required information and then call again markInitialState().<br>
&gt;<br>
&gt; I tried to find an alternative to not traverse the tree calling<br>
&gt; markInitialState() as suggested,<br>
&gt; and use something different like a listener to PostAddToViewEvent, but I<br>
&gt; found that it will not<br>
&gt; work, because it is possible to create a tag that add some attached object<br>
&gt; to a component<br>
&gt; on this event (for example: t:autoScrollPage).<br>
<br>
</div>Andy, you are concerned about additional tree-traversals, right? <br>
<br></blockquote><div><br>Yes. My test for this one is a variant of tomahawk datatable example:<br><br>        &lt;h:dataTable id=&quot;data&quot; styleClass=&quot;standardTable&quot;<br>            headerClass=&quot;standardTable_Header&quot; footerClass=&quot;standardTable_Header&quot;<br>
            rowClasses=&quot;standardTable_Row1,standardTable_Row2&quot;<br>            columnClasses=&quot;standardTable_Column,standardTable_ColumnCentered,standardTable_Column&quot;<br>            var=&quot;country&quot; value=&quot;#{countryList.countries}&quot;&gt;<br>
            &lt;h:column&gt;<br>                &lt;f:facet name=&quot;header&quot;&gt;<br>                    &lt;h:outputText value=&quot;#{bundle[&#39;label_country_cities&#39;]}&quot; /&gt;<br>                &lt;/f:facet&gt;<br>
                &lt;h:dataTable id=&quot;cities&quot; styleClass=&quot;standardTable_Column&quot;<br>                    var=&quot;city&quot; value=&quot;#{country.cities}&quot;&gt;<br>                    &lt;h:column&gt;<br>
                        &lt;h:inputText id=&quot;city&quot; value=&quot;#{city}&quot; style=&quot;font-size: 11px&quot; /&gt;<br>                    &lt;/h:column&gt;<br>                &lt;/h:dataTable&gt;<br>            &lt;/h:column&gt;<br>
        &lt;/h:dataTable&gt;<br><br>Note in this case, if we let the algorithm as is, markInitialState() for &quot;cities&quot; is called twice.<br><br>&gt;&gt; Do you have any ideas how we could do this better if we want to properly<br>
&gt;&gt; implement partial state saving in tables?<br><br>I&#39;ll keep trying to find alternatives for this one.<br><br>best regards,<br><br>Leonardo Uribe<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

If not, I would like to add this approach to our 2.1 roadmap.<br>
<br>
Should we open issues?<br>
<br></blockquote><div><br>There exists this issue:<br><br><a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=153">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=153</a><br>
<br></div></div>regards,<br><br>Leonardo Uribe<br>