Help

Controls

PermLinkWikiLink
Switch Workspace

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
04. Oct 2008, 23:33 America/New_York | Link

Currently it is possible to have a global pages.xml file or a .page.xml per page.

I would like to be able to define multiple meta-inf/pages.xml and have them all merged similar to the way meta-inf/components.xml works.

It looks like I could just modify Pages.initialize() to work similar to the way Initialization.initComponentsFromXmlDocuments() works something like this:

public void initialize() {
   // leave existing impl
   for (String resource: resources) {
      InputStream stream = ResourceLoader.instance().getResourceAsStream(resource);      
      parse(stream);
   }
   
   // add adding approach
   Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources("META-INF/pages.xml");
   while (resources.hasMoreElements()) {
      URL url = resources.nextElement();
      parse(url.openStream());
   }
}

Does anyone see any unintended side effects or problems with doing this?

4 Replies:
05. Oct 2008, 15:42 America/New_York | Link

File a feature request with a patch :-)

 

Read about how to report a bug.

05. Oct 2008, 19:00 America/New_York | Link

Right now you can specify multiple pages.xml files and have them merged.

Check out this link to the old Seam forums :

Multiple Pages.xml

 

---------------- www.andygibson.net ----------------
My blog for my Open Source Projects, Tutorials and Java EE 6 Maven Archetypes
Connect with me on Twitter or LinkedIn

05. Oct 2008, 19:07 America/New_York | Link

Oh, and this goes in components.xml

Cheers,

Andy

 

---------------- www.andygibson.net ----------------
My blog for my Open Source Projects, Tutorials and Java EE 6 Maven Archetypes
Connect with me on Twitter or LinkedIn

05. Oct 2008, 22:17 America/New_York | Link

Thanks for pointing out the additional multiple pages configuration feature. That helps a little but doesn't cover all of my goals.

Here is another posting that covers the whole plugin goal I am after:

Seam Plugins

Here are the JIRA features/patches I created:

https://jira.jboss.org/jira/browse/JBSEAM-3509

https://jira.jboss.org/jira/browse/JBSEAM-3510