ICEfaces
  1. ICEfaces
  2. ICE-2046

I need to be able to start a webflow when tab is selected causing view selected from flow to appear in tab

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Jdk 1.5

      Description

      I need webflow to be usable within the context of a tab in PanelTabSet. I tried iframe and that doesn't work also.

        Activity

        Hide
        Keith Garry Boyce added a comment -

        This is a taglib supporting webflows. Instructions are as follows:
        ! Link your webflow to the appropriate Navigation Tab

        • Use the webflow:include custom tag to specify the name of the WebFlow,using the 'flowController' attribute;
        • flowController beans must be defined in the spring application context. On standard place to put them is in /src/resources/com/xcorp/xxxx/resources/spring/client/ctx/applicationCtx.xml, but it better to define the controllers in separate files in the same directory with the convention [[usecase]Ctx.xml. Then you can include these files in the application context from web.xml using the contextConfigLocation context-param. Here is an example of defining personSearchController in file /src/resources/com/xcorp/xxxx/resources/spring/client/ctx/personSearchCtx.xml
          {{ { <?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:flow="http://www.springframework.org/schema/webflow-config" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd"> <bean id="personSearchController" class="org.springframework.webflow.executor.mvc.FlowController"> <property name="flowExecutor" ref="flowExecutor"/> <property name="defaultFlowId" value="personSearchFlow"/> </bean> </beans> }

          }}

        • the value of defaultFlowID corresponds to the name of the flow xml file created above.
        • webflow:include custom tag is a custom facelet taglib derived from standard ui:include facelet xml tag. It's specialized behaviour is that rather than just include another facelet page it includes a webflow
          • This maps the flow to be displayed in the tab area to the name of the web flow defined above
          • Set the 'tabHierarchy' attribute as a bottom up and comma separated list of tab indexes (leftmost tab is index 0) indicating which tabs would be selected in order for this webflow to be displayed.
          • By default flow state will persist if you move from tab to tab so if you come back to previous tab then tab will be in the same state you left it.
            • By specifying resetOnTabChange="true" then the state will be cleared when you leave tab and when you come back to tab then flow will restart.
        Show
        Keith Garry Boyce added a comment - This is a taglib supporting webflows. Instructions are as follows: ! Link your webflow to the appropriate Navigation Tab Use the webflow:include custom tag to specify the name of the WebFlow,using the 'flowController' attribute; flowController beans must be defined in the spring application context. On standard place to put them is in /src/resources/com/xcorp/xxxx/resources/spring/client/ctx/applicationCtx.xml, but it better to define the controllers in separate files in the same directory with the convention [ [usecase] Ctx.xml. Then you can include these files in the application context from web.xml using the contextConfigLocation context-param. Here is an example of defining personSearchController in file /src/resources/com/xcorp/xxxx/resources/spring/client/ctx/personSearchCtx.xml {{ { <?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:flow="http://www.springframework.org/schema/webflow-config" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd"> <bean id="personSearchController" class="org.springframework.webflow.executor.mvc.FlowController"> <property name="flowExecutor" ref="flowExecutor"/> <property name="defaultFlowId" value="personSearchFlow"/> </bean> </beans> } }} the value of defaultFlowID corresponds to the name of the flow xml file created above. webflow:include custom tag is a custom facelet taglib derived from standard ui:include facelet xml tag. It's specialized behaviour is that rather than just include another facelet page it includes a webflow This maps the flow to be displayed in the tab area to the name of the web flow defined above Set the 'tabHierarchy' attribute as a bottom up and comma separated list of tab indexes (leftmost tab is index 0) indicating which tabs would be selected in order for this webflow to be displayed. By default flow state will persist if you move from tab to tab so if you come back to previous tab then tab will be in the same state you left it. By specifying resetOnTabChange="true" then the state will be cleared when you leave tab and when you come back to tab then flow will restart.
        Hide
        Keith Garry Boyce added a comment -

        I would like this integrated into either icefaces or webflow.

        Perhaps you all will be able to work out why when I display a page for the first time parent and thus the paneltabset component is null.
        Also the order of the panel tabs as children of the panelTabSet is not always correct at time tablib executes. I have seen this in the case of nested tabs.

        If you can figure these 2 things out we can the avoid having to specify tabHierarchy

        an example of usage of webflow:include taglib is as follows:

        <ice:panelTab label="#

        {msg['tab_personSearch']}

        ">
        <webflow:include flowController="personSearchController"
        tabHierarchy="1,3,2" resetOnTabChange="true">
        <ui:param name="decorator" value="/facelet/template/tabContentTemplate.xhtml"/>
        </webflow:include>
        </ice:panelTab>

        Show
        Keith Garry Boyce added a comment - I would like this integrated into either icefaces or webflow. Perhaps you all will be able to work out why when I display a page for the first time parent and thus the paneltabset component is null. Also the order of the panel tabs as children of the panelTabSet is not always correct at time tablib executes. I have seen this in the case of nested tabs. If you can figure these 2 things out we can the avoid having to specify tabHierarchy an example of usage of webflow:include taglib is as follows: <ice:panelTab label="# {msg['tab_personSearch']} "> <webflow:include flowController="personSearchController" tabHierarchy="1,3,2" resetOnTabChange="true"> <ui:param name="decorator" value="/facelet/template/tabContentTemplate.xhtml"/> </webflow:include> </ice:panelTab>
        Hide
        Keith Garry Boyce added a comment -

        This work has been moved to http://jira.springframework.org/browse/SWF-660 since it's no longer icefaces dependent

        Show
        Keith Garry Boyce added a comment - This work has been moved to http://jira.springframework.org/browse/SWF-660 since it's no longer icefaces dependent

          People

          • Assignee:
            Unassigned
            Reporter:
            Keith Garry Boyce
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: