开发者

Spring Webflow: How to to customize externalRedirect in end-state?

开发者 https://www.devze.com 2023-03-25 21:25 出处:网络
The parent flow of my webflows has the following end-state defined: <end-state id=\"endState\" view=\"external开发者_如何学GoRedirect:contextRelative:index.html\"/>

The parent flow of my webflows has the following end-state defined:

<end-state id="endState" view="external开发者_如何学GoRedirect:contextRelative:index.html"/>

This will redirect to http://server/context/index.html

All my flows are now configured to run in an "embedded" mode (no menus/header/etc.) if the context path contains /embedded (I implemented this by using my own ViewResolver and different tiles layouts). Example: http://server/context/embedded/page.htm uses the same flow as http://server/context/page.htm but with a different layout.

When the site is running in "embedded" mode I want the end-state to redirect to http://server/context/embedded/index.html.

How can I customize this to rather use externalRedirect:contextRelative:embedded/index.html when the the URI contains /embedded?


You could determine the embedded state from a managed bean and use EL to determine a path:

externalRedirect:contextRelative:#{myBean.getPath()}
0

精彩评论

暂无评论...
验证码 换一张
取 消