1. you could define a hivemind configuration-point into which you may
contribute your page-names, implement a service that takes that takes
this configuration-point as an arg and inject it wherever you need it.
No need to access the HM-Reg.

2. Skip hivemind altogether and do sth like:
   for ( String id : getNamespace().getChildIds() ) {
         INamespace lib = getNamespace().getChildNamespace( id );
       List<String> pages = lib.getPageNames();
        //...
  }

> -----Original Message-----
> From: Eckenfellner Klaus [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 06, 2007 2:34 PM
> To: users@tapestry.apache.org
> Subject: dynamic plugins / menu problem
> 
> hi everybody!
> 
> i want to create a modulare application, which is organized 
> into several plugins (tapestry component libraries). each 
> plugin has it's own pages /  services / interfaces / logic. 
> each plugin in independent from the other plugin and also the 
> application.
> 
> the application does only contain some stylesheets and 
> minimal basic functions. the plugins are registered as 
> libraries in the application using the default application 
> specification mechanism.
> 
> my problem now is, that i must give the user some possibility 
> to visit the pages of the different plugins. -> using 
> pagelink. but that logic has to be dynamic because the 
> application doesn't know which plugins are enabled(declared 
> in application specification) or not.
> 
> my solution to this problem is ....
> all plugins have a hivemind - service which implements a 
> PluginInterface. now extending 
> applicationServlet.constructRegistry to get hivemind 
> Registry. using the method 
> Registry.getServiceIds(java.lang.Class pluginInterface) i get 
> all enabled plugins ... now with Registry.getService(java.lang.String
> serviceId, java.lang.Class serviceInterface) i could invoke 
> each PluginService which is able to told me pages that i 
> could inject -> now storing information into ASO.
> 
> my questions:
>       *       do you know any better solution, because i am 
> not sure if this is the
> best way
>       *       is the only way to get the Hivemind-Registry to extend
> ApplicationServlet.constructRegistry ?
> 
> thx
> eckenfellner klaus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to