Consider the following table definition:
<t:dataTable id="queueDetails"
styleClass="recordSetTable"
headerClass="resultSetTableHeader"
rowClasses="cellDataAltRow,cellDataFirstRow"
renderedIfEmpty="true"
var="row"
preserveDataModel="true"
binding="#{workbenchForm.data}"
value="#{workbenchForm.dataModel.value}"
rows="#{workbenchForm.dataModel.rows}"
sortColumn="#{workbenchForm.dataModel.sortColumn}"
sortAscending="#{workbenchForm.dataModel.sortAscending}"
preserveSort="true" >
<t:columns id="columns" value="#{workbenchForm.columns}"
var="column" >
<f:facet name="header">
<t:commandSortHeader
columnName="#{column.label}" immediate="false"
arrow="true" actionListener="#{workbenchForm.actionListener}"
styleClass="cellDataHeader">
<h:outputText value="#{column.label}" />
</t:commandSortHeader>
</f:facet>
<h:outputText value="#{workbenchForm.columnValue}" />
</t:columns>
</t:dataTable>
Everything worked fine until I added code that made the value of the
'columns' DataModel (registered as value attribute of t:columns) change
based on a user selection from a drop-down menu; now all of a sudden the
actionListener is no longer firing. I suspect that this is because the
value of columns is null after the restore view phase (since request values
that it depends on have not been applied yet), so the associated action
event is removed from the queue. My question is: how do I preserve the
value of the columns DataModel long enough for the event to fire? Is there
some kind of preserveDataModel="true" attribute for t:columns just as for
t:dataTable? I tried using t:savestate, but since DataModel is not
Serializable it throws an exception.
--
View this message in context:
http://www.nabble.com/Is-there-preserveDataModel-for-t%3Acolumns--tf2005219.html#a5507902
Sent from the MyFaces - Users forum at Nabble.com.