[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-635) Pageflow started in render response phase using <start-page>doesn't work

Richard Leherpeur (JIRA) jira-events at jboss.com
Wed Jan 10 13:12:31 EST 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-635?page=comments#action_12350460 ] 
            
Richard Leherpeur commented on JBSEAM-635:
------------------------------------------

I believe this defines a defauld transition, right?
<start-page name="start">
    <transition to="isUserLoggedIn"/>
</start-page>

In my case, NavigationHandler is not called, or I should say an exception is trhown before.

When AbstractSeamPhaseListener.beforeRender() reach the line:
      callPageActions(event);

the init method of my SFSB is called:
    @Begin
    public void init() {

        // Start the flow
        Pageflow.instance().begin(this.getPageflow());
    }

Then Manager.instance().prepareBackswitch(facesContext) is called. In that method, Pageflow.instance().getPage() will throw an exception because the node is not a page (which is normal since at this point we didn't navigate to any page yet).

Another thing I tried to do is to call in the SFSB
Pageflow.instance().navigate(facesContext, null); right after the call to 




> Pageflow started in render response phase using <start-page>doesn't work
> ------------------------------------------------------------------------
>
>                 Key: JBSEAM-635
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-635
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: BPM
>    Affects Versions: 1.1.0.GA
>         Environment: Jboss 4.0.5GA
>            Reporter: Richard Leherpeur
>         Assigned To: Gavin King
>
> With the following pageflow definition:
> <?xml version="1.0"?>
> <pageflow-definition name="test">
>    
> 	<start-page name="start">
> 		<transition to="isUserLoggedIn"/>
> 	</start-page>
>     
> 	<decision name="isUserLoggedIn" expression="#{loginAction.isUserLoggedIn}">
> 		<transition name="true" to="page1" />
> 		<transition name="false" to="page2" />
> 	</decision>
> ...
> </pageflow-definition>
> When the flow is started in a SFSB by calling a method definied like:
> @Begin
> public void init() {
> 	...
> 	Pageflow.instance().begin(this.getPageflow());
> }
> The pageflow is not starting properly. There are no errors messages in the logs but the application defined error page is displayed.
> Now, if the previous code is followed by:
> Pageflow.instance().navigate(facesContext, null);
> then the flow starts fine and reach the first page. But then it seems that the flow lost the conversation and it is not possible to access the SFSB that started the conversation anymore.
> I believe a comment about this usecase is made in org.jboss.seam.core.Pageflow in the method:
> public void begin(String pageflowDefinitionName)
> {
>       if ( log.isDebugEnabled() )
>       {
>          log.debug("beginning pageflow: " + pageflowDefinitionName);
>       }
>       
>       processInstance = PageflowHelper.newPageflowInstance( getPageflowProcessDefinition(pageflowDefinitionName) );
>       
>       //if ( Lifecycle.getPhaseId().equals(PhaseId.RENDER_RESPONSE) ) 
>       //{
>     	  //if a pageflow starts during the render response phase
>     	  //(as a result of a @Create method), we know the navigation
>     	  //handler will not get called, so we should force the
>     	  //pageflow out of the start state immediately
>         //TODO: this is not actually completely true, what about <s:actionLink/>
>     	  //pi.signal();
>       //}
>       
>       setDirty();
>       
>       Events.instance().raiseEvent("org.jboss.seam.beginPageflow." + pageflowDefinitionName);
>       
>       storePageflowToViewRootIfNecessary();
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list