如何使用gvNIX数据来指定数据表的排序?而基于Petclinic样本的例子将是很棒的。
对于我的应用程序,我希望为每个表指定数据表中记录的排序顺序。
发布于 2015-11-24 08:43:23
锁定src/main/webapp/WEB-INF/tags/datatables/column.tagx中支持的选项--属性sortInit和sortDirection应该可以帮助您。
<jsp:directive.attribute name="sortInit"
type="java.lang.String" required="false" rtexprvalue="true"
description="(asc|desc) If sortable is enabled, set the default sorting direction (Default : asc)" />
<jsp:directive.attribute name="sortDirection"
type="java.lang.String" required="false" rtexprvalue="true"
description="((asc|desc)[,(asc|desc)[...]])If sortable is enabled, allow to control the sorting direction(s) (default 'asc,desc') (related to asSorting js-datatables columnDef)" />例如,在list.jspx上
<table:table data="${pets}" id="l_com_springsource_petclinic_domain_Pet" path="/pets" z="gvs425syhOX//lJjxIylimFQflM=">
<table:column id="c_com_springsource_petclinic_domain_Pet_sendReminders"
property="sendReminders" z="9OZRH4z6dmoKcOlx/Gs0++zdd/A="/>
<table:column id="c_com_springsource_petclinic_domain_Pet_name"
property="name" sortInit="asc" z="USER-MANAGED"/>
<table:column id="c_com_springsource_petclinic_domain_Pet_weight" property="weight" z="sDq86anRDnXzji8d7j+tb9X7coI="/>
....
....
</table:table>我建议您检查所有.tagx文件。它的参数将显示所有支持的选项和功能,您可以使用。
祝好运!
https://stackoverflow.com/questions/33878228
复制相似问题