Announcement Announcement Module
Collapse
No announcement yet.
JSF and WebFlow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    craigmcc did you integrate JSF in a way that supports JSF portlets?

    craigmcc did you integrate JSF in a way that supports JSF portlets? If so can you point me to documentation on that?

    Comment


    • #32
      I opened up issue on what I found..

      http://opensource.atlassian.com/proj...browse/SWF-113

      Comment


      • #33
        Where in the framework would be the best place to initiate a flow?

        I still haven't got any feedback on this. Please take 5mins to give me a tidbit of info.

        Where in the framework would be the best place to initiate a flow. Currently the initial page is not part of the flow it is specified by portal integration framework and from that the flow is launched. I think it makes more sense to define the flowId of the flow to be launched and it could then pick up the page and any initial actions from flow definition.

        Comment


        • #34
          I have done some refactoring and my current solution appears to accomplish this

          I have streamlined some of the JSF integration so now everything is driven by the flow including the initial state.
          Below are the 3 relavent files.

          portlet.xml contains the standard DispatcherPortlet portlet we know and love.
          In sellItemPortlet.xml for view mode it delegates to a JsfPortletFlowController with the flowId defining the flow (in this case sellItem)
          The entry state of the portlet occurs when the portlet is displayed in the portal
          In this case the entry-actions for sellItem run which populate request prior to display of view-state.
          On submit sellItemDetails view state is entered.

          It seems to all work but now I need the spring team to get involved but for some reason (probably JavaOne) no one is responding to these JSF-Portlet-Webflow posts.


          portlet.xml
          <?xml version="1.0" encoding="UTF-8"?>
          <portlet-app version="1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
          xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">

          <portlet>
          <portlet-name>ReviewClaimsPortlet</portlet-name>
          <portlet-class>org.springframework.web.portlet.DispatcherPo rtlet</portlet-class>
          <init-param>
          <name>contextConfigLocation</name>
          <value>
          classpath:spring/sellItemsPortlet.xml
          </value>
          </init-param>
          <supports>
          <mime-type>text/html</mime-type>
          <portlet-mode>VIEW</portlet-mode>
          </supports>
          <portlet-info>
          <title>Sell Items</title>
          </portlet-info>
          </portlet>
          </portlet-app>


          classpath:spring/sellItemsPortlet.xml
          <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
          "http://www.springframework.org/dtd/spring-beans.dtd">

          <!-- Application context definition -->

          <beans>

          <bean id="portletModeControllerMapping"
          class="org.springframework.web.portlet.handler.Por tletModeHandlerMapping">
          <property name="portletModeMap">
          <map>
          <entry key="view">
          <ref bean="sellItemsFlowController" />
          </entry>
          </map>
          </property>
          </bean>

          <bean id="sellItemsFlowController" class="org.springframework.webflow.executor.mvc.Js fPortletFlowController">
          <property name="flowLocator" ref="flowLocator"/>
          <property name="defaultFlowId"><value>sellItems</value></property>
          </bean>
          </beans>

          sellItems.xml
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE flow PUBLIC "-//SPRING//DTD WEBFLOW 1.0//EN"
          "http://www.springframework.org/dtd/spring-webflow-1.0.dtd">

          <flow start-state="sellItems">

          <view-state id="sellItems" view="/WEB-INF/jsp/sellItems.jsp">
          <transition on="submit" to="sellItemDetail"/>
          </view-state>

          <view-state id="claimsDetail" view="/WEB-INF/jsp/sellItemDetail.jsp">
          <transition on="submit" to="sellItems"/>
          </view-state>

          </flow>

          Comment

          Working...
          X