显示标签排序重复页面上执行的最后操作 [英] display tag sorting duplicate the last action performed on the page
问题描述
我有这样的显示标签.
<display:table class="displayTable" id="orgList"
name="${sessionScope.organisationArray}" requestURI="" pagesize="13"
defaultsort="1" sort="list">
<display:column property="organisationName"
title="Organisation Name" sortable="true" headerClass="sortable"/>
<display:column property="description" title="Description" />
</display:table>
我从Session中获得了数据的ArrayList.
I got the ArrayList of the data from Session.
问题是,每当我单击以对组织名称"列进行排序时,它都会自动执行最后一个操作.例如,我添加一个新的组织,然后回到列表.然后单击排序,然后添加新的组织,再次执行.
The problem is whenever I click to sort the Organisation Name column, it automatically performs the last action. For example, I add a new organistation, then I back to the list. And I click to sort, then adding of a new organisation perform again.
当我检查可排序列上的URL时,它指向最后一个操作(添加操作)URL.如果最后一个动作是删除,则指向删除动作.再次单击可排序"列就可以了,效果很好.
但是只是第一次直接从另一个动作中返回时,排序就是复制相同的动作. 我该如何克服这个问题?
But just first time straight back from another action, sorting is duplication the same action. How can I overcome this problem?
谢谢.
推荐答案
最后,我通过添加requestURI="blahblah.action"
来解决此问题,该操作只是为了显示所有列表.
Finally I fix it just by adding requestURI="blahblah.action"
which is an action just to display all the list.
感谢以下链接: coderanch.com/t/53098 /Struts/display-tag-sorting-Struts 谢谢.
Thanks to the following link: coderanch.com/t/53098/Struts/display-tag-sorting-Struts Thanks.
请检查此链接以获取详细信息.
please check this link for detail info.
这篇关于显示标签排序重复页面上执行的最后操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!