I just upgraded from Seam 2.0.1.GA to Seam 2.1.0.SP1 and now all my *.page.xml are stop working. If I specify the navigation rules inside the global pages.xml, it works. What's going on? No exceptions thrown and the EAR file deploys successfully too.
For each page.xml file, I no longer put the view-id attribute as it is already implied according to the manual. I tried both ways but still not working. I am sure it is not a template path problem either.
Anyone has the same problem? Any ideas?
Thanks in advance!
Hi, maybe you may need to update your schemaLocation in every page.xml and also components.xml
I suggest you to read file seam21migration.txt from the project.
Best regards, Nicola
Hi Nicola,
Thanks for the quick reply. I have done that step for all configuration xml files (components, page, pages, etc) and make sure I am using the latest schema. Still to no avail.
I read the Seam21migration.txt and it's not helping either. This is strange because if I put the navigation rules in the pages.xml, it works.
Hi, why don't you post some code of your pages? It may help.
Nic
Hi Ray,
Did you ever find a fix for your problem?
I am now facing a similar problem, but it doesn't even pick up the pages.xml file, let alone the individual page.xml files.
Any pointers?
Thanks, Osh
I now have it picking up the pages.xml file and navigating from there, so I am now in the same situation, where the page.xml files are not being picked up.
Did you ever find a fix to the problem?
Osian
This might sound silly, but if you are using hot-deploy with JBoss then I suggest:
1) Shutdown JBoss 2) Delete jboss-4.2.2.GA\server\default\work\jboss.web\localhost\<EAR_NAME> directory 3) Delete the jboss-4.2.2.GA\server\default\deploy\<EAR_NAME> directory 4) Clean your local distribution folder 5) Completely redeploy your application
You'd be surprised what JBoss keeps in its cache, even when you think you've completely undeployed your application. The reason it might not be picking up your *.pages.xml files is that the actual components.xml and other files that you have upgraded along with Seam 2.1 might not actually be loading, but instead an older version of those files.
Hi Chris,
I've tried that, but still it does not want to pick up my pages.xml file's.
Do I need to register them somewhere?
Osian
Wouldn't it be great if we had logging for our .pages.xml files (JBIDE-3383)? or event better, if we had debugging (JBSEAM-3831)? That way it would be a lot easier to find out why your .page.xml files are not working as expected...
Please vote for them if you think any of this JIRAs could help you!
Please don't forget to rate!
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - Antoine de Saint Exupéry
Please visit my blog
I'm having the same trouble.. anyone have any a clue as to what's happening? I'm comparing to what's in the seamdiscs example, but can't see anything different.
I switched also from 2.0 (2.0.1.GA) to 2.1 (2.1.1.GA) and have the same problem.
In my case the viewids are jsp-files. So I have for example a start.jsp-file and a start.page.xml file. This file is ignored.
In the source of 2.1.1.GA I found in src/main/org/jboss/seam/navigation/Pages.java the following line (line 158):
So I think the used view-id is wrong and so the information in page.xml will not applied.
I have now changed everything to .xhtml (from .jsp) and added the DEFAULTSUFFIX-Contextparameter with the value .xhtml and everything is now fine. Maybe the source in Pages.java should honor the DEFAULTSUFFIX Setting and should not use a static .
I am also having this issue. I would like another page to be redirected to if a certain scenario arises after login. No matter what I do home.xhtml comes up. I've even removed all references to /home.xhtml in all of the .page.xml and pages.xml files and it still goes to the home page!!
This is a really big show stopper!
Does anybody solved the issue? I'm facing the same problem with Seam 2.1.2 (after migrating from Seam 2.0.2). I tried to debug initialization of Pages component and found quite weird behaviour. When application is initialized, org.jboss.seam.navigation.pages component is created (it has @Startup annotation) and all .page.xml definitions are parsed and added to internal Map pagesByViewId. But when first request is sent to application, it creates org.jboss.seam.navigation.pages component again, but in this time is DotPageDotXmlDeploymentHandler.instance() null and thus .page.xml definitions are not parsed and used. Is this a bug?
Thanks,
Jakub.
Ok, it helped me to switch off seam debug mode (in components.xml). I think it has somethink to do with hot deployment, but I'm not going to check it anymore (I've get a little lost while traversing seam source codes and purpose of Pages.java initialization with DotPageDotXmlDeploymentHandler.instance() and WarRootDeploymentStrategy attribute).
I was facing a similar problem when I upgraded from Seam 2.0.2 to Seam 2.2.0. The pages.xml file worked but all individual .page.xml files stopped working. I finally got them working by adding each .page.xml file as a navigation resource in components.xml. Also the root tag of each .page.xml file had to be pages and not page.
See my blog post for details: How to configure multiple page.xml files in Seam 2.2
"JSF1013: Unable to find matching navigation case from view ID '/index.xhtml' for outcome 'verification' and action '#{com.mydomain.abc.action.security.indexAction.login()}'
First working solution I found was using "How to configure multiple page.xml files in Seam 2.2" outlined in post above.
I had two issues with that solution:
1. I had to change each of my *.page.xml files to use the <pages><page>...</page></pages> tags whereas my previous implementation was simply using <page>...</page> without parent <pages></pages> tag. My application was quite large which made this process very tedious.
2. Updating the components.xml file to register each *.page.xml file within <navigation:pages><navigation:resources>...</navigation:resources></navigation:pages> tags. Again this is a tedious process and triggers memories of working in struts where each action/page had to be configured in the application.
The solution worked but for me but, I found a better, easier way.
Second working solution I stumbled across was to simply update my components.xml file from:
<component name="org.jboss.seam.core.init">
<property name="debug">true</property>
</component>
to
<component name="org.jboss.seam.core.init">
<property name="debug">false</property>
</component>
I reverted my changes of including the <navigation:pages><navigation:resources>...</navigation:resources></navigation:pages> tags in the components.xml file as well as changing all my *.page.xml files back to only using the <page>...<page> tag. With just changing the debug property value to false, the JSF1013 issue went away and my navigation worked as it did previously throughout my entire application.
This seems like a bug in seam when running in debug ... yes, no?