[Opensource] ConfigManager custom properties

Eddie Lewis ELewis at copyright.com.au
Thu Feb 13 16:14:51 PST 2003


After adding the property to your xml config file get the property in your
app via

  // example utility function to get a custom property
  public static String getCustomProp () 
  {
    String sCustomProp = null;
    
    try {
        sFontDir =
ConfigManager.getContext("default").getCustomProperty("PropertyInConfigFile"
);
    } catch (Exception e) {
      // do something
    }
    
    return sCustomProp ;
  }

-----Original Message-----
From: Michael Rimov [mailto:rimovm at centercomp.com]
Sent: Friday, 14 February 2003 7:36 AM
To: opensource at jcorporate.com
Subject: Re: [Opensource] ConfigManager custom properties


At 02:44 PM 2/12/2003 +0100, you wrote:
>Hi list,
>according to the documentation it is possible to add some custom 
>properties to the expresso configuration xml files. But I don't understand 
>how. What should be the name of the tag?

Helga,

I looked at the Expresso DTD:

<!ELEMENT context (description?, hasSetupTables?, jdbc?, type-mapping*, 
images, startJobHandler?, showStackTrace?, mailDebug?, customProperty*, 
path-mappings*, expressoDir?, setupDefault*)>

<!ELEMENT customProperty (name, value)>


So according to this you should put
<customProperty>
         <name>Test</name>
         <value>Abcdefg</value>
</customProperty>

after mailDebug entries in your expresso-config contexts....

Disclaimer:  I personally haven't used it in my own apps, so mileage may 
vary. :(

                                                 -Mike



_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20030214/64d2d427/attachment-0002.htm


More information about the Opensource mailing list