开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜