<br><br><div class="gmail_quote">2010/5/26 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;">
<div class="im">>> 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>
>><br>
><br>
> When markInitialState() is called on the table, we need to save the state of<br>
> all children<br>
> inside the table component. Later, when UIData.setRowIndex is called we use<br>
> that<br>
> information to restore the initial state first of each component and then<br>
> apply the delta.<br>
><br>
> Right now, when markInitialState() is called on the table, all children<br>
> inside the table has<br>
> been already marked, so we need to call clearInitialState() on all children,<br>
> 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<br>
> markInitialState() as suggested,<br>
> and use something different like a listener to PostAddToViewEvent, but I<br>
> found that it will not<br>
> work, because it is possible to create a tag that add some attached object<br>
> to a component<br>
> 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> <h:dataTable id="data" styleClass="standardTable"<br> headerClass="standardTable_Header" footerClass="standardTable_Header"<br>
rowClasses="standardTable_Row1,standardTable_Row2"<br> columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"<br> var="country" value="#{countryList.countries}"><br>
<h:column><br> <f:facet name="header"><br> <h:outputText value="#{bundle['label_country_cities']}" /><br> </f:facet><br>
<h:dataTable id="cities" styleClass="standardTable_Column"<br> var="city" value="#{country.cities}"><br> <h:column><br>
<h:inputText id="city" value="#{city}" style="font-size: 11px" /><br> </h:column><br> </h:dataTable><br> </h:column><br>
</h:dataTable><br><br>Note in this case, if we let the algorithm as is, markInitialState() for "cities" is called twice.<br><br>>> Do you have any ideas how we could do this better if we want to properly<br>
>> implement partial state saving in tables?<br><br>I'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>