struts2 f分页的问题 求高人进来给个解决方案

xu443458144 xu443458144 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
当我进入到查询页面输入条件后 查询出很多值 (比如100条 一叶显示10条) 当我点击下一页时候 我先前输入的筛选条件全部给我清空了 又从新 查询很多结果(就好比我没有输入条件一样 全部查出来了 ) 没有达到我的 预期结果!

本人才开始学 web开发 往高人解决! 贴点代码

多次点击 查询 时条件不会清空 但是点击下一页时 就会清空

查询按钮 代码


<td></td>
<td align="right"><s:submit value="查询" name="method:selectCommodityMany"> </s:submit></td>
<td align="left"><s:reset value="重置"></s:reset></td>
<td></td>


下一页 触发事件 代码

<s:url id="url_pre" namespace="/mystruts2" action="selectcommodity" method="selectCommodityMany">
<s:param name="commodityvo.currenpage" value="commodityvo.currenpage-1"></s:param>
</s:url>
<s:url id="url_next" namespace="/mystruts2" action="selectcommodity" method="selectCommodityMany">
<s:param name="commodityvo.currenpage" value="commodityvo.currenpage+1"></s:param>
</s:url>
<tr><s:a href="%{url_pre}">上一页</s:a>
<s:iterator value="list" status="rowstatus">
<s:url id="url" namespace="/mystruts2" action="selectcommodity" method="selectCommodityMany">
<s:param name="commodityvo.currenpage" value="commodityvo.currenpage"/>
</s:url>
</s:iterator>
<s:a href="%{url_next}">下一页</s:a></tr>
</table>






给个解决思路也行!
...全文
评论 5
收藏 已收藏
分享
返回顶部
xu443458144
Web 开发 81,107 成员 341,720 内容