You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 7 Members of 4087 |
| Forum: Seam Users |
31. Mar 2008, 18:34 CET | Link |
Hello,
When navigating a link which is not in the pageflow, the framework returns an error: Illegal navigation
.
If a user performs a click on a link that is not within the pageflow, I want to end the conversation and after redirect to the page specified by the link.
This is possible?
Thanks,
Ariel
I am waiting a answer for this as well.
Nesting pageflow
Marcell Manfrin Barbacena
Tribunal Superior Eleitoral
+55 (61) 3316-3645
mbarbacena a tse.gov.br
barbacena a gmail.com
Brazil - Brasília
I guess that this is due to conversation propagation.
I think you should not use s:link for your links, which by default propagates conversation. If you insist on using that tag, then pass propagation="none" attribute to it. That will not stop conversation, but get out of it's context. Maybe there is an option like propagation="end" but I haven't tried it yet.
Hi,
The problem is that jPDL navigation is constrained (by contrast to JSF or Seam navigation which are free form).
So, with jPDL, the path that your users can follow is represented by a finite graph, with well defined transitions from state to state (a state being either a page or decision).
Each time the jPDL/jBPM detects that a user took a path that is not defined in the graph, it triggers an Illegal navigation Exception.
If you provide some kind of for your users (like a button, or ), you should end the pageflow when the user use it. The key point is to end the conversation : that will end the pageflow as well.
According to the doc, this is done by using <end-conversation> (in your .jpdl.xml file) or by calling an @End method. AFAIK, you could use a s:link to do that. But propagation="none" will not suffice: the conversation will not be propagated thought the link, but will still be active.
You need an s:link with propagation="end" (yes, it exists !)
Hope this helps,
Sylvain
Thanks guys... but this is not working well. If you use a s:link with
the conversation is ended but this still trigger the IllegalNavigation Exception.. If you click for second time in the link then works fine..this is the correct behaviour?
Ariel
Looking the PageFlow class, I realized that this is a pending task (TODO). I think that in order to achieve the behaviour wanted, we must to comment the lines 133 to 137 :)
Here is the part of the code that we must comment:
//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(); }There should be a way to end the pageflow without ending the conversation.
They should be considered different features.
Marcell Manfrin Barbacena
Tribunal Superior Eleitoral
+55 (61) 3316-3645
mbarbacena a tse.gov.br
barbacena a gmail.com
Brazil - Brasília
Yes, that way exist..As Bernard or Sylvain said in the previous post you must write a s:link with
Hi.
doesn't work - the conversation is closed, but I have Illegal Navigation Error. Tested seam version: 2.1.0.A1.
Will it be fixed? When?
Thanks!
Jan
I think this will be fixed in the next release. Anyway, you can fix it following the post that I wrote above.
Ariel
Is there a JIRA issue opened for this fix? I can't find one. How about a link or number? If there's no JIRA issue, I don't think it's on the radar to be fixed.
And, I don't see an explanation of a fix above for the case where one DOES want to end the conversation with propagation=end. Or, was the suggested fix for now to comment and recompile the code?
Thanks
There is no JIRA issue for this bug.. I thought that there was.. Can you report this?
The suggested fix is recompile the code :)
Comment the line that throw the illegalNavigationError() in the PageFlow class and recompile the code..
This is the fastest solution that we have..
Ariel
I am not able to sign up to Seam Jira. Would anybody report this bug...? I've recompiled seam - it works now! Thanks!
Jan