-
1. Re: Problems with links in pageflow pages based on templates
pmuir Oct 3, 2007 7:47 AM (in response to chawax)/home isn't a valid viewId...
-
2. Re: Problems with links in pageflow pages based on templates
chawax Oct 3, 2007 9:27 AM (in response to chawax)I don't think this is what causes my problem. I tried with /home.xhtml or /home.seam, and I have the same problem.
-
3. Re: Problems with links in pageflow pages based on templates
chawax Nov 28, 2007 10:11 AM (in response to chawax)Hi,
I still have not found a solution to this problem and it still exists with newer versions of Seam. When running a pageflow conversation, only links modeled in the pageflow work, others throw an "illegal navigation" error . But when you use templates, there are links you should not have to add to your pageflow !
So is there a way to disable navigation check on some links when running a pageflow conversation ? -
4. Re: Problems with links in pageflow pages based on templates
pmuir Nov 28, 2007 10:19 AM (in response to chawax)Doing a link based on a viewId like
<s:link view="/foo.xhtml" />
certainly should work from inside a pageflow.
Post the exception and server log from the start of the request -
5. Re: Problems with links in pageflow pages based on templates
chawax Nov 28, 2007 11:10 AM (in response to chawax)Thanks for your response.
Well, there is no exception, but nothing happens when I click on the link (same behaviour as a null return from a backing bean) and I have this message in the server log :sourceId=null[severity=(WARN 1), summary=(Illegal navigation), detail=(Illegal navigation)]
If you say it should work, it means there is something I do wrong.
My pageflow is as following :<?xml version="1.0" encoding="UTF-8"?> <pageflow-definition name="processusCrud"> <start-state name="start"> <transition name="default" to="infosGeneralesProcessus" /> </start-state> <page name="infosGeneralesProcessus" view-id="/processus/processusCrud/infosGeneralesProcessus.xhtml"> <redirect/> <transition to="processus paramétrable ?" name="suivant"></transition> <transition to="fin" name="annuler"> <action expression="#{processusCrud.annuler}" /> </transition> </page> <decision name="processus paramétrable ?" expression="#{processusCrud.modeleProcessusSelectionne.parametres != null}"> <transition to="parametrageProcessus" name="true"> <action expression="#{processusCrud.refreshParametrage}" /> </transition> <transition name="false" to="recapitulatifProcessus"></transition> </decision> <page name="parametrageProcessus" view-id="/processus/processusCrud/parametrageProcessus.xhtml"> <redirect/> <transition to="recapitulatifProcessus" name="suivant"></transition> <transition name="precedent" to="infosGeneralesProcessus"></transition> <transition to="fin" name="annuler"> <action expression="#{processusCrud.annuler}" /> </transition> </page> <page name="recapitulatifProcessus" view-id="/processus/processusCrud/recapitulatifProcessus.xhtml"> <redirect/> <transition to="fin" name="valider"> <action expression="#{processusCrud.valider}" /> </transition> <transition name="precedent" to="parametrageProcessus"></transition> <transition to="fin" name="annuler"> <action expression="#{processusCrud.annuler}" /> </transition> </page> <page name="fin" view-id="/processus/listeProcessus.xhtml"> <redirect/> </page> </pageflow-definition>
The pageflow is started with a @Begin annotaion:@org.jboss.seam.annotations.Begin(pageflow = "processusCrud", join = true) public java.lang.String select(mypackage.processus.VOProcessus processus) {}
And my select method is called this way ...<s:button value="#{messages['label.nouveau']}" action="#{processusCrud.select(null)}" />
... or this way :<h:commandButton id="cmdDetail" value="#{messages['label.detail']}" action="#{processusCrud.select(processus)}" />
The link in my template is :<s:link view="/home.xhtml" value="Accueil" />
Is there anything more to do ? -
6. Re: Problems with links in pageflow pages based on templates
gazadonf Nov 28, 2007 12:29 PM (in response to chawax)Hy.
In your template, try to remove the view tag.
There's obviously a problem with redirect tag in the page flow and view tag in the templates.
This solution work's for my problem.
see here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=124715
If it doesn't work, i think you have to add some code like this in your page.xml:<page view-id="*"> <navigation from-action="#{myAction}"> <end-conversation/> <redirect view-id="myPath/home.xhtml"></redirect> </navigation> </page>
-
7. Re: Problems with links in pageflow pages based on templates
chawax Nov 29, 2007 3:53 AM (in response to chawax)Do you mean I should replace the <s:link view="/home.xhtml" /> by something like <s:link action="#{myComponent.action}" /> ?
-
8. Re: Problems with links in pageflow pages based on templates
gazadonf Nov 29, 2007 8:27 AM (in response to chawax)You should try. It works for me.
As i understand, there's a problem using view tag in a template and redirect tag in the pageflow.
They don't work together. Why? I currently still don't know.
Or if you don't know how to replace your view code by an action code, remove your redirect tag in your pageflow. But i don't know what are the consequences when you refresh your page. -
9. Re: Problems with links in pageflow pages based on templates
chawax Nov 29, 2007 12:00 PM (in response to chawax)I tried all what you said, and I still have the problem. In fact I have two links in my template :
<s:link action="#{navigation.retourAccueil}" value="Accueil" propagation="end" /> <s:link action="#{identity.logout}" value="Deconnexion" rendered="#{identity.loggedIn}" propagation="end" />
The one binded to action {identity.logout} works well. But not the one binded to the action I wrote, which still throws an "illegal navigation" error while I can't see differences between them ! The problem is the same if I use view="/home.xhtml" attribute instead of action one. Same problem too when I remove all tags in the pageflow definition.
My "navigation" Seam component is like this :@Name("navigation") @Scope(ScopeType.SESSION) public class NavigationAction { public void retourAccueil() { } }
My pages.xml file in /WEB-INF :<page view-id="*"> <navigation from-action="#{navigation.retourAccueil}"> <end-conversation /> <redirect view-id="/home.xhtml" /> </navigation> <navigation from-action="#{identity.logout}"> <end-conversation /> <redirect view-id="/home.xhtml"></redirect> </navigation> </page>
Do you see something different compared with what you did ? -
10. Re: Problems with links in pageflow pages based on templates
chawax Nov 29, 2007 12:01 PM (in response to chawax)Sorry .... Please read "Same problem too when I remove all redirect tags in the pageflow definition.
-
11. Re: Problems with links in pageflow pages based on templates
gazadonf Nov 29, 2007 1:03 PM (in response to chawax)The only thing i see is the difference between the two redirection in your page.xml.
the fist one you wrote (and doesn't work) is<redirect view-id="/home.xhtml" />
and the secon one is<redirect view-id="/home.xhtml"></redirect>
Try to inverse those two redirections and see what happen.
if it works, try something like this<page view-id="*"> <navigation from-action="#{navigation.retourAccueil}"> <end-conversation /> <redirect view-id="/home.xhtml"></redirect> </navigation> <navigation from-action="#{identity.logout}"> <end-conversation /> <redirect view-id="/home.xhtml"></redirect> </navigation> </page>
-
12. Re: Problems with links in pageflow pages based on templates
chawax Nov 30, 2007 3:32 AM (in response to chawax)It still doesn't work ... The link is the same, the navigation configuration is the same, the only difference is that I use different components. So it must come from my "navigation" component. I added @BypassInterceptors annotation to my component (this is what is done with "identity" component, but it changes nothing. Which annotations did you put on your component class and on its methods ?
-
13. Re: Problems with links in pageflow pages based on templates
gazadonf Nov 30, 2007 5:13 AM (in response to chawax)I only use identity coponent so i do nothing more than what seam has done.
But i notice something else yesterday.
I have a main pageflow with a sub-pageflow.
At the first strike, it doesn't work because i leave propagation=none in my s:link
Without it, it works. I'll try today to restore it and change the option to see what happen.
Just a question:
I use Seam 2.0.0.GA, november 2007.
Which one do you use? -
14. Re: Problems with links in pageflow pages based on templates
chawax Nov 30, 2007 5:23 AM (in response to chawax)I use Seam 2.0.0.GA too