在displaytag分页中提交表单

编程入门 行业动态 更新时间:2024-10-27 18:27:55
本文介绍了在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(&#39;{1}&#39;))" title="Go to page {0}">{0}</a> </display:setProperty>

这按预期工作.

更多推荐

在displaytag分页中提交表单

本文发布于:2023-10-11 13:55:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1481890.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分页   表单   displaytag

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!