【问题标题】:How to maintain sorting of a table that is done using <display tag> after going to next page and then coming back on same转到下一页然后返回相同的页面后,如何维护使用 <display tag> 完成的表格的排序
【发布时间】:2016-03-11 22:59:03
【问题描述】:

我有一个包含以下代码的jsp:

  <display:table onclick="myAction.do?method=displayDetails" sort="list" name="${UCForm.liste}" defaultsort="1" defaultorder="descending" pagesize="40" export="true" requestURI="myAction.do?method=recherche" decorator="web.displaytag.TableDecorator" id="listeId"> <display:setProperty name="export.csv.filename" value="abc.csv" /> <display:column property="abcName" title="Name" sortable="true" headerClass="sortable"/> <display:column title="VL" sortable="true" headerClass= "sortable" > <c:if test="${listeId.blocagevl eq 1}"><img src="img/Lock.png" height="10" width="10"/></c:if></display:column> </display:table>

我想要的是当用户单击任何列对表格进行排序并进入下一个屏幕然后返回此屏幕时,应该保持排序。

【问题讨论】:

    标签: jsp struts jsp-tags struts-1


    【解决方案1】:

    每个列标题都有一个指向当前页面的链接,其中包含进行排序所需的查询字符串。

    当用户返回时保持表格排序的一种方法是在用户每次单击标题时将查询字符串保存在会话中。在加载页面的操作中,检查用户是否存储了查询字符串并进行了相应的重定向。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-20
      • 2014-01-15
      • 1970-01-01
      • 2022-01-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多