Spring Web Flow
  1. Spring Web Flow
  2. SWF-660

JSF taglibrary to run webflows in tabbed env...

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0.RC1
    • Fix Version/s: 3.0.0
    • Component/s: Integration: Servlet
    • Labels:
      None

      Description

      JSF taglibrary to run webflows in tabbed env... To run you'll need icefaces 1.7.0 ( just-ice-1.7.0.jar, icefaces-comps.1.7.0.jar and icefaces-facelets-1.7.0.jar)

        Activity

        Hide
        Keith Garry Boyce added a comment -

        This works for the most part except for 1 error:

        1) start application
        2) page shows up with 2 levels of tabs
        3) level1: tab0 tab1 tab2
        level2: tab0 tab1 tab2
        level1: tab 0 running flow
        level2: tab 0 running 2 flows

        4) click on level1:tab1 that runs flow
        5) click on button on level1:tab1 to go to next page
        6) next page (page2 of flow on level1:tab1) contains 3 other tabs
        7) click on level2:tab2 on this new page
        8) click on level1:tab0
        9) click on level2:tab2

        get following error:

        org.springframework.webflow.execution.repository.NoSuchFlowExecutionException: No flow execution could be found with key 'c1v1' – perhaps this executing flow has ended or expired? This could happen if your users are relying on browser history (typically via the back button) that references ended flows.
        at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.getConversation(AbstractFlowExecutionRepository.java:177)
        at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.getLock(AbstractFlowExecutionRepository.java:121)
        at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:149)
        at com.icefaces.taglib.WebFlowBoundaryComponent$1.executeInContext(WebFlowBoundaryComponent.java:144)

        the flow on level1:tab0 seems to have disappeared from repository

        Show
        Keith Garry Boyce added a comment - This works for the most part except for 1 error: 1) start application 2) page shows up with 2 levels of tabs 3) level1: tab0 tab1 tab2 level2: tab0 tab1 tab2 level1: tab 0 running flow level2: tab 0 running 2 flows 4) click on level1:tab1 that runs flow 5) click on button on level1:tab1 to go to next page 6) next page (page2 of flow on level1:tab1) contains 3 other tabs 7) click on level2:tab2 on this new page 8) click on level1:tab0 9) click on level2:tab2 get following error: org.springframework.webflow.execution.repository.NoSuchFlowExecutionException: No flow execution could be found with key 'c1v1' – perhaps this executing flow has ended or expired? This could happen if your users are relying on browser history (typically via the back button) that references ended flows. at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.getConversation(AbstractFlowExecutionRepository.java:177) at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.getLock(AbstractFlowExecutionRepository.java:121) at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:149) at com.icefaces.taglib.WebFlowBoundaryComponent$1.executeInContext(WebFlowBoundaryComponent.java:144) the flow on level1:tab0 seems to have disappeared from repository
        Hide
        Keith Garry Boyce added a comment - - edited

        Did some refactoring.
        1) upgraded to webflow release 2.0.0 (that solved error above which occured because of default max sessions = 5)
        2) zip is an eclipse project..
        3) dependency on icefaces has been removed from webflow stuff
        4) webflow stuff has been re-packaged
        5) Icefaces extension class and demo with icefaces on PanelTabSet is the resultant war

        Show
        Keith Garry Boyce added a comment - - edited Did some refactoring. 1) upgraded to webflow release 2.0.0 (that solved error above which occured because of default max sessions = 5) 2) zip is an eclipse project.. 3) dependency on icefaces has been removed from webflow stuff 4) webflow stuff has been re-packaged 5) Icefaces extension class and demo with icefaces on PanelTabSet is the resultant war
        Hide
        Keith Garry Boyce added a comment -

        Uploaded new version with additional refactoring.. removing need to access RequestContext externally to webflow. RequestContext is now internal to webflow only as originally intended and some RequestContext is used to encodeChildren in the view in the case where webflow is responsible for rendering the view

        Show
        Keith Garry Boyce added a comment - Uploaded new version with additional refactoring.. removing need to access RequestContext externally to webflow. RequestContext is now internal to webflow only as originally intended and some RequestContext is used to encodeChildren in the view in the case where webflow is responsible for rendering the view
        Hide
        Keith Garry Boyce added a comment -

        Includes a fix for when there are no visibiles getting a null pointer exception

        Show
        Keith Garry Boyce added a comment - Includes a fix for when there are no visibiles getting a null pointer exception
        Hide
        Keith Garry Boyce added a comment -

        Here is a newer version where postback occurs somewhat correctly going through the jsf lifecycle again when the webflow included view is to be rendered.

        here in my views are the challenges..

        1) webflow 2.0 currently manages entire jsf lifecycle out of the box including view...
        2) but for a jsf taghandler to work the following things need to happen
        a) when an active webflow attempts to render the view instead of just rendering the JSF lifecycle has to begin again checking to see if the included view is already a jsf view and applying request parameters targeted to it and validations targetted to it. In addition the new view should not be a full render. It needs to render as children of the targetted webflow container that fired off the flow in the first place
        b) JSF needs to store this view somewhere for post back but this has the following issues.
        i) When jsf post back, in the case of tabs it will find the the page has not actually change and will attempt to do postback on the full page with the encoding webflows outside of the context of a webflow thread.. This this needs to be prevented and postback should only occur on the portions of this page where the components are not within a webflow
        ii) deriving this view and corresponding store should not interfere with the original jsf page
        3) Icefaces sometimes cast to BridgeFacesContext which causes ClassCast errors. (specifically this occurs with the focus API, it may occur other places.

        So with these challenges i have "LUCKED" into a situation where a lot of this works but it needs to be better thought through with both the experts at icefaces and spring webflow.

        Outstanding issues are:
        1) for some reason as of yet identified, populated selectitem list are getting duplicated somehow by the framework.
        2) ClientId's do not appear to match what icefaces thinks.. Don't know if it's integration or bug in icefaces. focus api reports that it can't find component that I focused on.

        Show
        Keith Garry Boyce added a comment - Here is a newer version where postback occurs somewhat correctly going through the jsf lifecycle again when the webflow included view is to be rendered. here in my views are the challenges.. 1) webflow 2.0 currently manages entire jsf lifecycle out of the box including view... 2) but for a jsf taghandler to work the following things need to happen a) when an active webflow attempts to render the view instead of just rendering the JSF lifecycle has to begin again checking to see if the included view is already a jsf view and applying request parameters targeted to it and validations targetted to it. In addition the new view should not be a full render. It needs to render as children of the targetted webflow container that fired off the flow in the first place b) JSF needs to store this view somewhere for post back but this has the following issues. i) When jsf post back, in the case of tabs it will find the the page has not actually change and will attempt to do postback on the full page with the encoding webflows outside of the context of a webflow thread.. This this needs to be prevented and postback should only occur on the portions of this page where the components are not within a webflow ii) deriving this view and corresponding store should not interfere with the original jsf page 3) Icefaces sometimes cast to BridgeFacesContext which causes ClassCast errors. (specifically this occurs with the focus API, it may occur other places. So with these challenges i have "LUCKED" into a situation where a lot of this works but it needs to be better thought through with both the experts at icefaces and spring webflow. Outstanding issues are: 1) for some reason as of yet identified, populated selectitem list are getting duplicated somehow by the framework. 2) ClientId's do not appear to match what icefaces thinks.. Don't know if it's integration or bug in icefaces. focus api reports that it can't find component that I focused on.
        Hide
        Keith Garry Boyce added a comment -

        Here is new version with a temporary impl of simple repository... It currently has a problem in that the select items are duplicated when selecting from top dropdown.. so something about this repo is messed up.. standard repo works fine..

        Show
        Keith Garry Boyce added a comment - Here is new version with a temporary impl of simple repository... It currently has a problem in that the select items are duplicated when selecting from top dropdown.. so something about this repo is messed up.. standard repo works fine..
        Hide
        Keith Garry Boyce added a comment -

        Here is latest version.. It addresses several problems with restoring the view. Currently the view is stored in session since trying to use jsf state saving resulted in all kinds of issues

        Show
        Keith Garry Boyce added a comment - Here is latest version.. It addresses several problems with restoring the view. Currently the view is stored in session since trying to use jsf state saving resulted in all kinds of issues
        Hide
        Patricia Moura added a comment -

        Hello, I downloaded the project and executing the eclipse appeared only written one page 'title', missing some setting? thanks

        Show
        Patricia Moura added a comment - Hello, I downloaded the project and executing the eclipse appeared only written one page 'title', missing some setting? thanks

          People

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

            Dates

            • Created:
              Updated:

              Development