首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gvNIX数据集排序选项表(哪些字段)

gvNIX数据集排序选项表(哪些字段)
EN

Stack Overflow用户
提问于 2015-11-23 18:40:53
回答 1查看 174关注 0票数 0

如何使用gvNIX数据来指定数据表的排序?而基于Petclinic样本的例子将是很棒的。

对于我的应用程序,我希望为每个表指定数据表中记录的排序顺序。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-11-24 08:43:23

锁定src/main/webapp/WEB-INF/tags/datatables/column.tagx中支持的选项--属性sortInitsortDirection应该可以帮助您。

代码语言:javascript
复制
<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上

代码语言:javascript
复制
    <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文件。它的参数将显示所有支持的选项和功能,您可以使用。

祝好运!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33878228

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档