Uploaded image for project: 'ZK Spring'
  1. ZK Spring
  2. ZKSPRING-27

ZK Spring Web Flow support portal environment

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Normal Normal
    • 4.0.0
    • None
    • webflow
    • None

      When integrating spring web flow with portal, it should go through a FlowHandlerAdapter. However currently ZK Spring goes through the flowController way which is different, so it is not working.

      SWF

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      	xmlns:webflow="http://www.springframework.org/schema/webflow-config" 
      	xsi:schemaLocation=" http://www.springframework.org/schema/beans 
      	http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
      	http://www.springframework.org/schema/webflow-config 
      	http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd ">
       
      	<bean class="org.springframework.webflow.mvc.portlet.FlowHandlerAdapter">
      	    <property name="flowExecutor" ref="flowExecutor" />
      	</bean>
       
      	<webflow:flow-executor id="flowExecutor"/>
       
      	<webflow:flow-registry id="flowRegistry"
      		flow-builder-services="flowBuilderServices">
      		<webflow:flow-location path="/WEB-INF/flows/shopping.xml" id="shopping" />
      		<webflow:flow-location path="/WEB-INF/flows/addToCart.xml" id="addToCart"/> 
      	</webflow:flow-registry> 
       
      	<webflow:flow-builder-services id="flowBuilderServices"
      		view-factory-creator="mvcViewFactoryCreator" /> 
       
      	<bean id="mvcViewFactoryCreator"
      		class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
      		<property name="viewResolvers" ref="viewResolver" />
      	</bean>
      </beans>
      

      ZSWF

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      	xmlns:webflow="http://www.springframework.org/schema/webflow-config" 
      	xmlns:zksp="http://www.zkoss.org/2008/zkspring/webflow" 
      	xsi:schemaLocation=" http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
          http://www.springframework.org/schema/webflow-config 
          http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd 
          http://www.zkoss.org/2008/zkspring/webflow
          http://www.zkoss.org/2008/zkspring/webflow/zkspring-webflow.xsd">
       
      	<zksp:flow-controller id="flowController" flow-executor="flowExecutor"/>
       
      	<webflow:flow-executor id="flowExecutor"/> 
       
      	<webflow:flow-registry id="flowRegistry"
              flow-builder-services="zkFlowBuilderServices">
              <webflow:flow-location path="/WEB-INF/flows/main/shopping.xml"/>
              <webflow:flow-location path="/WEB-INF/flows/main/addToCart.xml" />
          </webflow:flow-registry>
       
         <zksp:flow-builder-services id="zkFlowBuilderServices"/>
       
      </beans>
      

            hawk hawk
            jimmyshiau jimmyshiau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: