How do I implement sorting on a YUI DataTable which uses struts data?
How do I implement sorting on the below YUI DataTable? The datasource is stru开发者_如何学编程ts.
<yui:datatable containerId="printResults"
dataSource="userSavedQueries"
dataSourceType="TYPE_HTMLTABLE"
dataTableType="ScrollingDataTable"
width="100%"
height="11em">
<s:iterator value='{"Search Name","Domain","Last Modified","Action"}' status="status">
<yui:datacolumn>
<jsp:attribute name="key">
<s:property value="top"/>
</jsp:attribute>
<jsp:attribute name="label">
<s:property value="top"/>
</jsp:attribute>
<jsp:attribute name="sortable">false</jsp:attribute>
</yui:datacolumn>
</s:iterator>
</yui:datatable>
I have managed to sort the table by using: true
This puts sortability on all columns. I am not sure how to implement sorting on only a few specific colums.
精彩评论