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.
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.
why don't you post some code of your pages?
It may help.
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.
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?
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.
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?
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):
String viewId = "/" + fileName.substring(0,fileName.length()-".page.xml".length()) + ".xhtml"; // needs more here
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?
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).