You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Itell, Jason R" <ja...@lmco.com> on 2006/12/15 20:09:11 UTC
Tomahawk datatable within facelets component
Hi,
I have several pages that contain <t:dataTable>'s for which I've built a
custom Facelets ui:composition column component. The column component
cleans up the code by allowing me to reuse the tags that are common to
all of my columns.
The issue I am running into is that the Tomahawk sorting mechanism does
not work on any column that is in a ui:composition component.
My code within the composition component is as follows:
<ui:composition>
<t:column>
<f:facet name="header">
<t:commandSortHeader columnName="#{field}" arrow="true">
<h:panelGroup>
<h:outputText value="#{header}"/>
</h:panelGroup>
</t:commandSortHeader>
</f:facet>
<h:outputText value="#{record[field]}"/>
</t:column>
</ui:composition>
And the code to call that component:
<t:dataTable value='#{taskController.tasks}'
id="items" var="item"
rowClasses="row1, row2"
preserveDataModel="true"
preserveSort="true"
sortable="true"
arrow="true">
<g:column record="#{item}"
field="taskid"
header="#{msg.id}"/>
</t:dataTable>
Any ideas?
Jason