You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Paul Spencer <pa...@apache.org> on 2006/07/07 23:20:27 UTC
Is a Sortable required to be enclosed in ?
Must a <t:dataTable> be enclosed in a <f:form> for sorting to work?
This is my experience with Tomahawk 1.1.3, but it I does no appear to be
document!
Below is an example of a data table with 2 sortable columns.
<h:form>
<t:dataTable value="#{list.entries}" var="row" >
<t:column sortable="true" sortPropertyName="col1">
<f:facet name="header">
<h:outputLabel value="Col 1" />
</f:facet>
<h:outputText value="#{row.col1}" />
</t:column>
<t:column sortable="true" sortPropertyName="col2">
<f:facet name="header">
<h:outputLabel value="Col 2" />
</f:facet>
<h:outputText value="#{row.col2}" />
</t:column>
</t:dataTable>
</h:form>
BTW: This is a great feature that was added in 1.1.3! Thank you to the
developers
Paul Spencer
Re: Is a Sortable required to be enclosed in ?
Posted by Catalin Kormos <ca...@yahoo.com>.
Yes, when you enable sorting on the dataTable the columns headers become links, so, the enclosing <h:form> is needed. Check out [1] for more information and alternative. The code snippet you provided should work though, isn't it working?
Thanks for the kind words,
Catalin
[1] - http://wiki.apache.org/myfaces/Upgrading_to_Tomahawk_1.1.3
Paul Spencer <pa...@apache.org> wrote: Must a be enclosed in a for sorting to work?
This is my experience with Tomahawk 1.1.3, but it I does no appear to be
document!
Below is an example of a data table with 2 sortable columns.
BTW: This is a great feature that was added in 1.1.3! Thank you to the
developers
Paul Spencer
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.