commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Eberhardt <ceberha...@scottlogic.co.uk>
Subject [Configuration] Beans with Collection relationships
Date Wed, 16 May 2007 15:16:49 GMT
Hi,

I am just starting out with using the commons configuration framework, 
and it seems to fulfill most of my needs. I am currently using it to 
populate JavaBeans from XML files. However, I have not worked out how to 
construct beans with collection relationship. The example given in the 
docs is as follows:

http://jakarta.apache.org/commons/configuration/howto_beans.html#Declaring_and_Creating_Beans

<?xml version="1.0" encoding="ISO-8859-1" ?>
<config>
  <gui>
    <windowManager config-class="examples.windows.DefaultWindowManager"
      closable="false" resizable="true" defaultWidth="400"
      defaultHeight="250">
      <styleDefinition config-class="examples.windows.WindowStyleDefinition"
        backColor="#ffffff" foreColor="0080ff" iconName="myicon" />
    </windowManager>
  </gui>
</config>

What if the DefaultWindowManager class contained a collection of 
WindowStyleDefinition classes? Can the commons configuration populate 
such a bean?

If so, what is the format of the XML in this case?

Many Thanks,
Colin E.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message