如何在 JSF 中导航?如何使 URL 反映当前页面(而不是前一个页面) [英] How to navigate in JSF? How to make URL reflect current page (and not previous one)

查看:13
本文介绍了如何在 JSF 中导航?如何使 URL 反映当前页面(而不是前一个页面)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在学习 JSF,当我意识到每当我们使用 <h:form> 时,JSF 的标准行为是总是向我显示 previous 浏览器中的页面,而不是 当前 页面的 URL.

I am currently learning JSF and was rather amazed and puzzled when I realized that whenever we use <h:form>, the standard behavior of JSF is to always show me the URL of the previous page in the browser, as opposed to the URL of the current page.

我知道这与 JSF 总是将表单发布到同一页面的方式有关,然后只呈现控制器将其返回给不知道页面位置已更改的浏览器的任何页面.

I understand that this has to do with the way JSF always posts a form to the same page and then just renders whatever page the controller gives it back to the browser which doesn't know the page location has changed.

似乎 JSF 已经存在了很长时间,必须有一种干净、可靠的方法来处理这个问题.如果是这样,您介意分享吗?

我找到了各种解决方法,但遗憾的是没有一个看起来像真正可靠的解决方案.

I have found various workarounds, but sadly nothing that seems like a real solid solution.

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆