Hi Matteo,

Assuming JndiDs and WsDs are Collection<JndiDs> and Collection<WS>, I assume something along the lines of the following should work

class YourModule : public Datasources getDatasources(), public void setDatasources(Datasources) class Datasources: public Collection<JndiDs> getJndiDs(), public void setJndiDss(Collection<JndiDs>), public void addJndiDs(JndiDs) public Collection<WsDs> getWsDss(), public void setWsDss(Collection<WsDs>), public void addWS(WsDs)

Two remarks:
* given that your class names use accronyms and end with Ss, the pluralization might be a bit tricky... you might have to debug into the content2bean code - let me know if you need a pointer to where the pluralization occurs, i could check * you need the add() methods because content2bean/commons-beanutils (and Magnolia in general so far) are not generics-aware.

Let me know if that helps - I suppose you add seen http://documentation.magnolia-cms.com/reference/configuration.html#Content2Bean , feel free to comment or let us know if any additional info or clarification would help !

Cheers,

-g

On Apr 10, 2009, at 4:36 PM, Matteo Pelucco wrote:


Hi all,

I would like to have a module config section as following:

- module
 - config
   - datasources
     - jndids
       - jndi1
         * name: JNDI1
       - jndi2
         * name: JNDI2
     - wsds
       - ws1
         * endpoint: http://...
         * username: abc
         * password: xyz
       - ws2
         * endpoint: http://...
         * username: qwe
         * password: rty

I have 2 "config" beans:
JndiDs --> with 1 property "name"
WsDs   --> with 4 properties: name, endpoint, username, password

Are there any chances to have those beans automatically filled out during module startup? My difficult is try to differentiate the classes to be filled and the "two level" config (datasources/jndids ... datasources/wsds).

Thanks for any suggestion.
Matteo


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to