display tag sorting duplicate the last action performed on the page

泪湿孤枕 提交于 2019-12-24 15:20:40

问题


I have display tag like this.

<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>

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.

When I check the URL on the sortable column, it is pointing to the last action (Add action ) URL. If last action is delete, it is pointing to Delete action. Second time click on sortable column is OK, it works well.

But just first time straight back from another action, sorting is duplication the same action. How can I overcome this problem?

Thanks ahead.


回答1:


Finally I fix it just by adding requestURI="blahblah.action" which is an action just to display all the list.

Thanks to the following link: coderanch.com/t/53098/Struts/display-tag-sorting-Struts Thanks.

please check this link for detail info.



来源:https://stackoverflow.com/questions/7630622/display-tag-sorting-duplicate-the-last-action-performed-on-the-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!