1 2 Previous Next 16 Replies Latest reply on May 4, 2010 4:33 PM by robertfrank

    Seam 2.1.0.SP1 - page.xml navigation is not working

    rmurthi
      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!
        • 1. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
          nico.ben

          Hi,
          maybe you may need to update your schemaLocation in every page.xml and also components.xml


          xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"



          I suggest you to read file seam21migration.txt from the project.


          Best regards,
          Nicola

          • 2. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
            rmurthi

            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.


            • 3. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
              nico.ben

              Hi,
              why don't you post some code of your pages?
              It may help.


              Nic

              • 4. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                ohughes

                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

                • 5. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                  ohughes

                  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

                  • 6. Re: Seam 2.1.0.SP1 - page.xml navigation is not working

                    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.

                    • 7. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                      ohughes

                      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

                      • 8. Re: Seam 2.1.0.SP1 - page.xml navigation is not working

                        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!

                        • 9. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                          jim.barrows

                          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.

                          • 10. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                            muhviehstarr

                            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.

                            • 11. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                              muhviehstarr

                              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 DEFAULT
                              SUFFIX Setting and should not use a static .xhtml.

                              • 12. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                                mangelo123

                                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!

                                • 13. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                                  jimmy56

                                  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.

                                  • 14. Re: Seam 2.1.0.SP1 - page.xml navigation is not working
                                    jimmy56

                                    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).

                                    1 2 Previous Next