Mojarra 2.0.3
Works: 2.1
Doesn't work: 2.2M1
Synopsis: If you have a datatable set to rendered=false during initial page load, then later the rendered attribute is set to true, and the containing form is updated, the datatable will appear on the page correctly, however it is not sortable.
Code: Select all
<h:form prependId="false" id="claimSearchForm">
<p:commandButton value="${msgs.search}" id="searchButton"
action="#{claimHistoryMB.searchClaims}"
ajax="true" update="claimSearchForm,claimHistoryListForm">
</h:form>
<h:form prependId="false" id="claimHistoryListForm">
<c:forEach items="#{userMB.currentUserAndFamily}" var="member">
<p:panel rendered="#{claimHistoryMB.memberIsSelected(member)}">
<p:dataTable var="claim" value="#{claimHistoryMB.memberClaims[member]}" dynamic="true">
<p:column sortBy="#{claim.fillDate}" styleClass="col_fill_date">
<f:facet name="header">
<h:outputText value="${msgs.fill_date}" />
</f:facet>
<h:outputText value="#{claim.fillDate}" converter="i18nDateConverter" />
</p:column>
</p:dataTable>
</p:panel>
</c:forEach>
</h:form>
Now, select the additional member and you click 'searchButton' above. Now, after you do that, #{claimHistoryMB.memberIsSelected(member)} evaluates true to everyone. So two datatables appear.
The second datatable is not sortable in 2.2M1, however it's sortable in 2.1.