3 Replies Latest reply on Nov 2, 2007 6:17 AM by pmuir

    Using fine-grained pages.xml


      Seam wizards,

      I'm using the Seam 1.21GA documentation as a guide for breaking out a lengthy pages.xml into single, page specific files.

      According to the documentation, I am to break out each file into their given view-id and append .page.xml.

      Therefore, I have added:
      /resources/admin/da/categoryAdmin.page.xml
      ...


      I have stripped out the corresponding page definition from pages.xml and placed into each fine-grained file. Likewise, I removed the "view-id" parameter from each fine-grained page file.

      Here is what that same fine-grained file now looks like:

      <!DOCTYPE pages PUBLIC
       "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
       "http://jboss.com/products/seam/pages-1.2.dtd">
      
       <page conversation-required="true" no-conversation-view-id="/admin/da/moduleAdmin.xhtml">
       #{cvAdminModule.name}
       <begin-conversation nested="true" join="false"/>
       <navigation from-action="#{adminValueManager.findValuesByCategory}">
       <redirect view-id="/admin/da/valueAdmin.xhtml"/>
       </navigation>
       </page>


      However, after doing so, page definitions are no longer working. Have I done something wrong? Should the fine-grained files actually go under /resources/WEB-INF? If so, the documentation may need to describe this in more detail.

      Thanks for taking a look - hope someone has an tip for me to look at.



        • 1. Re: Using fine-grained pages.xml


          All,

          I fixed the issue by placing the xyz.page.xml page definitions within our /view layer aside with the actual .xhtml page files.

          I definitely think the documentation should reflect this as it's not very clear.

          So, now I have:
          /view/admin/da/categoryAdmin.xhtml
          /view/admin/da/categoryAdmin.page.xml

          I've also read that Seam 2.0 will support specifying additional pages.xml files rather than only have two options. Is this definitely in the 2.0 roadmap? If so, sounds great!

          Thanks.

          • 2. Re: Using fine-grained pages.xml
            matt.drees

             

            "chris.simons" wrote:

            I've also read that Seam 2.0 will support specifying additional pages.xml files rather than only have two options. Is this definitely in the 2.0 roadmap?


            Yes, Seam 2 supports this, with something like the following in components.xml:
             <navigation:pages>
             <navigation:resources>
             <value>/WEB-INF/pages.xml</value>
             <value>/WEB-INF/pages-admin.xml</value>
            ...
             </navigation:resources>
             </navigation:pages>
            


            I don't think it's documented yet.

            • 3. Re: Using fine-grained pages.xml
              pmuir