7 Replies Latest reply on Jan 10, 2012 1:16 AM by hantsy

    What's the replacement for Seam2's pages.xml

    qixunyuan

      Hi,
      What's the replacement for pages.xml? We configure the navigation rule in faces-config.xml now, but I don't want to do it like this. Although we can split the configure into more children files and configure in web.xml, but I think this is not good solution, anyone give me a suggestion? thank you.

        • 1. Re: What's the replacement for Seam2's pages.xml
          lightguard

          Navigation can be explicit now, so you can return the viewid you want to navigate to, should you decide to do that. The rest of the stuff can (mostly) be done with the ViewConfig in Seam Faces.

          • 2. Re: What's the replacement for Seam2's pages.xml
            qixunyuan

            Jason Porter wrote on Jan 04, 2012 15:41:


            Navigation can be explicit now, so you can return the viewid you want to navigate to, should you decide to do that. The rest of the stuff can (mostly) be done with the ViewConfig in Seam Faces.


            but some guys said, it will be difficult to modify the navigation rule if we return the viewid in the action method. sure, it will be a small problem, why not give the similar pages.xml way to configure the navigation and not only annotation?

            • 3. Re: What's the replacement for Seam2's pages.xml
              blabno

              How about faces-config.xml?

              • 4. Re: What's the replacement for Seam2's pages.xml
                qixunyuan

                Bernard Labno wrote on Jan 09, 2012 11:07:


                How about faces-config.xml?


                I want to modular the pages development, if using the faces-config.xml, many people should maintain the same file, and it's will not be good idea.
                Also, we can divide the file into many fragment and configure it in the web.xml, but this will also should maintain the web.xml.
                So, it's the best solution if there will be the same seam2's pages.xml configure.
                Any other idea?

                • 5. Re: What's the replacement for Seam2's pages.xml
                  bleathem

                  The @ViewConfig is the Seam 3 answer, it's just not complete yet.  See the following jiras:



                  • SEAMFACES-122: Find a way to use the @ViewConfig enums to provide type-safe navigation rules

                  • SEAMFACES-123: Implement a @ViewConfig annotation to control view navigation



                  Feel free to comment on the jiras with an design suggestions/contraints.


                  Pull requests welcome!


                  Brian

                  • 6. Re: What's the replacement for Seam2's pages.xml
                    hantsy

                    faces-config.xml can be included in mutil modular applcation.


                    I used seam2 xxx.page.xml for navigtion.


                    In Seam 3, I used some h:link and h:button instead of some navigations, and the others are configured in the faces-config.xml. I like use a action method signature(void method) to navigation, luckily, jsf2 also support this feature.

                    • 7. Re: What's the replacement for Seam2's pages.xml
                      hantsy

                      I hope @ViewConfig can repalce the pages.xml to configure the securtiy, global navigation etc, but it seems it is not powerful as the Seam2 pages.xml.
                      I do not know the progress of Apache DeltaSpike, in fact I like more about the features of MyFaces CODI, type safe navigation is one of them.