Navigation in JavaServer Faces, redirecting with correct parameters

混江龙づ霸主 提交于 2019-12-02 09:12:39
McDowell

With only the core JSF framework and the Facelets library, you may find this difficult. The JSF 1.2 library does not include support for adding request parameters to the redirect URL.

A few solutions spring to mind:

If you are stuck with JSF1.2, you can also use the <h:outputLink> and nest <f:param name="" value=""> tags within it. The outputLink will include the parameters as query-params: ?name=value

If you need page-actions, navigation from methods, or jsut want to let an extension manage this for you, you can use PrettyFaces – SEO, Dynamic Parameters, Bookmarks, and Navigation for JSF / JSF2

It includes much simplified JSF navigation and linking.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!