在displaytag分页中提交表单 [英] Submit form in a displaytag pagination
本文介绍了在displaytag分页中提交表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用spring portlet mvc和JQuery.问题是,当我单击displayTag中的分页链接时(例如,当我尝试转到第二页时),我需要提交表单.
I'm using spring portlet mvc and JQuery. The thing is that I need to submit my form when I click the pagination links from the displayTag (when I try to go to the second page for instance)
<form:form id="myForm" action="${formAction}" method="post" modelAttribute="myBean" enctype="multipart/form-data">
<portlet:actionURL var="viewListURL" portletMode="view">
<portlet:param name="action" value="${ServletContextKeys.MY_ACTION}"/>
</portlet:actionURL>
<display:table id="displayImpGasto"
name="${myList}"
requestURI="${viewListURL}"
htmlId="impList"
class="displayTagTable"
uid="imp"
pagesize="10">
<display:column>
//Whatever
</display:column>
</display:table>
</form:form>
仅这样做,就不会提交表单.任何的想法..?预先感谢.
Just doing like this, doesn't submit the form. Any idea..? Thanks in advance.
推荐答案
在上面的帖子中遵循以下想法:
Following the idea on the post above:
<script type="text/javascript">
function submitPagination(url) {
jQ("#formPagoParcial").attr('action', url);
jQ("#formPagoParcial").submit();
}
</script>
<display:setProperty name="paging.banner.page.link">
<a href="javascript:void(submitPagination('{1}'))" title="Go to page {0}">{0}</a>
</display:setProperty>
这按预期工作.
这篇关于在displaytag分页中提交表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文