[Opensource] ConfigManager custom properties
Helga Wyns
helgawyns at hotmail.com
Fri Feb 14 06:45:19 PST 2003
Thanks, Eddie and Mike. I had overlooked the customProperty tag in the DTD
:-(
This is a great feature!
>
>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/
_________________________________________________________________
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.be
More information about the Opensource
mailing list