将参数传递给下一个请求

发布于 2024-09-01 23:26:54 字数 251 浏览 2 评论 0原文

我遇到一种情况,单击数据表上一列中的链接会在同一页面中打开更新表格。问题是,当我点击提交按钮进行更新时,该更新面板的渲染再次设置为 false,该更新面板之前通过单击链接传递的参数设置为 true。

我尝试了 htmlhiddenInput 并执行了 setValue 和 getvalue 但值丢失了。有什么方法可以保存从链接发送的参数,当单击时,即使在提交表单之后也是如此。 我通过会话实现了它,但我不想使用会话。

如有任何帮助,我们将不胜感激,谢谢。

I have a situation where clicking a link in one column on the datatable opens A update FORM in the same page. The problem is when I hit the submit button for update, the render is set to false again of that update panel which was previously set true by parameter passed clicking the link.

I tried htmlhiddenInput and did setValue and getvalue but the value is lost. Is there any way I can save that parameter send from link, when clicked, even after submitting the form.
I achieved it doing session but I dont wanna use session.

Any help is appreciated, thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

简美 2024-09-08 23:26:54

如果您使用的是 JSF 2.0,请声明 bean @ViewScoped。如果您还使用 JSF 1.x,请安装 Tomahawk 并使用 保留 bean后续请求中的属性甚至整个 bean。例如

<t:saveState value="#{bean.renderTable}" />

<t:saveState value="#{bean}" />

If you're on JSF 2.0, declare the bean @ViewScoped. If you're yet on JSF 1.x, then install Tomahawk and use <t:saveState> to retain the bean property or even the entire bean in the subsequent request. E.g.

<t:saveState value="#{bean.renderTable}" />

or

<t:saveState value="#{bean}" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文