隐藏 URL 中的视图参数
我们正在使用 JSF 2.0。我们必须将视图参数从一个页面传递到另一个页面,因为页面是视图范围的。我们正在获取参数中的值,但我想知道是否有办法隐藏 URL 中的参数?
`public String submitForm(){`
`return "submitPage+faces-redirect=true&includeViewParameters=true&value=" + myBean.id;`
}
We are using JSF 2.0. We have to pass in view parameters from one page to another page as the pages are view scoped. We are getting the values in the params but I would like to know if there is there a way to hide the parameters in the URL?
`public String submitForm(){`
`return "submitPage+faces-redirect=true&includeViewParameters=true&value=" + myBean.id;`
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以您想使用 POST 而不重定向?然后相应地执行此操作:
在目标页面中,
#{myBean.id}
将按通常方式在 EL 中可用。So you want to use POST without redirect? Then just do that accordingly:
In the target page, the
#{myBean.id}
will just be available in EL the usual way.