【问题标题】:Spring Webflow: How to to customize externalRedirect in end-state?Spring Webflow:如何在最终状态下自定义 externalRedirect?
【发布时间】:2011-10-20 16:56:58
【问题描述】:

我的 webflow 的父流定义了以下结束状态:

<end-state id="endState" view="externalRedirect:contextRelative:index.html"/>

这将重定向到http://server/context/index.html

如果上下文路径包含/embedded,我的所有流程现在都配置为在“嵌入式​​”模式下运行(无菜单/标题/等)(我通过使用我自己的ViewResolver 和不同的磁贴布局实现了这一点) .示例:http://server/context/embedded/page.htm 使用与 http://server/context/page.htm 相同的流程,但布局不同。

当站点以“嵌入式”模式运行时,我希望最终状态重定向到http://server/context/embedded/index.html

当 URI 包含 /embedded 时,如何自定义它以使用 externalRedirect:contextRelative:embedded/index.html

【问题讨论】:

    标签: spring-webflow-2


    【解决方案1】:

    您可以从托管 bean 中确定嵌入状态并使用 EL 来确定路径:

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

    【讨论】:

      猜你喜欢
      • 2018-03-02
      • 2011-08-13
      • 2021-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-26
      • 1970-01-01
      • 2016-11-08
      相关资源
      最近更新 更多