如何使用SpringWebFlow弹出窗口=";“真的”;有素描的脸?

如何使用SpringWebFlow弹出窗口=";“真的”;有素描的脸?,spring,jsf,primefaces,jsf-2.2,spring-webflow-2,Spring,Jsf,Primefaces,Jsf 2.2,Spring Webflow 2,到目前为止,我们使用的是SpringWebflow2.3,它带来了“sf”名称空间和Spring.js,可以用来在弹出窗口中显示视图状态 Webflow 2.4不推荐使用Spring.js,并使用以下语句删除了标记库: SpringWebFlow的早期版本附带了一个组件库,它为JSF1.2环境提供了Ajax和客户端验证功能。使用这些组件的应用程序需要切换到第三方JSF组件库,如PrimeFaces或RichFaces 见: 现在,我已经在pom.xml中添加了Primefaces 5.2的依赖项

到目前为止,我们使用的是SpringWebflow2.3,它带来了“sf”名称空间和Spring.js,可以用来在弹出窗口中显示视图状态

Webflow 2.4不推荐使用Spring.js,并使用以下语句删除了标记库:

SpringWebFlow的早期版本附带了一个组件库,它为JSF1.2环境提供了Ajax和客户端验证功能。使用这些组件的应用程序需要切换到第三方JSF组件库,如PrimeFaces或RichFaces

见:

现在,我已经在pom.xml中添加了Primefaces 5.2的依赖项,除了SWF弹出窗口(它只是重定向到新的视图状态)之外,一切似乎都正常工作

第一页:


第二页(应在弹出窗口中呈现):


abc
流定义:


弹簧配置:

<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
    <property name="flowExecutor" ref="flowExecutor"/>
</bean>

<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
    <property name="flowRegistry" ref="flowRegistry"/>
</bean>

<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
    <webflow:flow-execution-listeners>
        <webflow:listener ref="facesContextListener"/>
    </webflow:flow-execution-listeners>
</webflow:flow-executor>

<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices"/>

<!-- Populates the flowRegistry on startup. Removing this and manually adding all flows changes nothing.  -->
<bean class="config.FlowRegisteringBeanPostProcessor"/>

<faces:flow-builder-services id="flowBuilderServices"/>

<faces:resources/>

<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>

我不包括web.xml,因为没有什么特别的

使用Mojarra 2.2、Primefaces 5.2、Spring 4.2和Webflow 2.4.1

通过使用Firebug,我可以看到服务器POST响应发出重定向,JSF/Primefaces对此表示尊重,并完全重定向到新的视图状态,而不是显示弹出窗口:

<?xml version='1.0' encoding='UTF-8'?>
<partial-response id="j_id1"><redirect url="/Demo/spr/dashboard?execution=e1s2"></redirect></partial-response>


如果有人能够在使用或不使用Spring.js的情况下使用这些版本,我很高兴听到这个消息。

我们最终使用了Primefaces的p:dialog和p:confirmDialog,而不是Webflow弹出窗口


这并没有真正回答我的问题,但我看不到答案,因为Webflow发送相同的响应,无论popup设置为true还是false。

FYI:2.2版以来,JSF通过CDI
@FlowScoped
注释提供了新的内置流范围,这使得SWF变得多余。我们尝试了Faces流,但是当使用自定义JSF实现时,WebSphere似乎不支持CDI,并且附带了MyFaces 2.0的(修改版本)。
<flow xmlns="http://www.springframework.org/schema/webflow"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="
        http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd">

    <view-state id="start" view="dashboard.xhtml">
        <transition on="add-widget" to="popup-addWidget"/>
    </view-state>

    <view-state id="popup-addWidget" view="popup-addWidget.xhtml" popup="true">
        <on-render>
            <render fragments="popupFragment"/>
        </on-render>
    </view-state>

</flow>
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
    <property name="flowExecutor" ref="flowExecutor"/>
</bean>

<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
    <property name="flowRegistry" ref="flowRegistry"/>
</bean>

<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
    <webflow:flow-execution-listeners>
        <webflow:listener ref="facesContextListener"/>
    </webflow:flow-execution-listeners>
</webflow:flow-executor>

<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices"/>

<!-- Populates the flowRegistry on startup. Removing this and manually adding all flows changes nothing.  -->
<bean class="config.FlowRegisteringBeanPostProcessor"/>

<faces:flow-builder-services id="flowBuilderServices"/>

<faces:resources/>

<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>
<?xml version='1.0' encoding='UTF-8'?>
<partial-response id="j_id1"><redirect url="/Demo/spr/dashboard?execution=e1s2"></redirect></partial-response>