[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3056) JPDL navigation and seam

Andy Gibson (JIRA) jira-events at lists.jboss.org
Wed Jun 3 17:52:56 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12470511#action_12470511 ] 

Andy Gibson commented on JBSEAM-3056:
-------------------------------------

We had the same problem with it, not a problem for plain links (or one with propagation="none") etc.., but in things like menu items, which use an action, we ended up coding a navigation helper that would end a long running conversation and perform the redirection.

We created a NavigatorBean class as a stateless Seam component and had a goto view method that took the view name as a parameter. In the jsf component, we made the action="#{navigator.gotoView('/secure/path/myPage.xhtml')}"

In the gotoView method, we just used ; 

	public void gotoView(String view) {

		if (Conversation.instance().isLongRunning()) {
			Conversation.instance().end(true);
		}

		Redirect.instance().setViewId(view);
		Redirect.instance().execute();
	}

Not sure whether a work around needs writing or whether the check just needs removing period. You could make it a property of the workflow with a "strict" parameter that can be set to true if you want strict workflow (which could generating a warning in the log), or false if you can navigate willy nilly. 










> JPDL navigation and seam
> ------------------------
>
>                 Key: JBSEAM-3056
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3056
>             Project: Seam
>          Issue Type: Task
>          Components: BPM
>            Reporter: Florian Keusch
>
> hi
> In our applications we have a navigation menu. When we use seam and some jpdl pageflows we have the following problem:
> if we leave the pageflow with a <s:link propagation="end"> (e.g. clicking on the menu), then the pageflow conversation is ended but also an illegal navigation exception is thrown. 
> This issue was described on the seam framework: http://www.seamframework.org/Community/ProblemWithJPDLIllegalNavigation but I could not find it in this Jira.
> It's not solved. In the code (PageFlow.java) there's a TODO where the illegal navigation ecxeption is thrown:
>          //now check that the restored view id matches what we expect
>          //from the pageflow node
>          //TODO: we need some way to disable this check, since users
>          //      might want some adhoc nav in and out of a pageflow?
>          String viewId = Pages.getViewId(facesContext);
>          if ( !viewId.equals( getPage().getViewId() ) )
>          {
>             illegalNavigationError();
>          }
> If we use <s:link propagation="none"> in our menu navigation then this will not cause a illegal navigation exception, but in the background the conversations are still there not ended.
> fke

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

        



More information about the seam-issues mailing list