You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sean gao secpay <se...@secpay.com> on 2005/08/25 13:04:07 UTC

loading global configuration in Tapestry3 and the usage of org.apache.tapestry.property-source

<Question 1>
I would like load  configurable global properties  in my application
These are name/value pairs such as
   tempfolder.path=/home/users/temp
   default.color=white
stored in .properties files or in a database.

Ideally I would like to be able to set something like this in the 
application specification file
    <property name="org.apache.tapestry.global-config">
        config.properties{,config2.properties,config3.properties}
    </property>
But this seems to be impossible without patching tapestry3

Guess I could extend  BaseEngine or define a custom version of Global .
Just wondering which is the common way of achieving this in tapestry?

<Question 2>
It is mentioned in the user guide  
http://jakarta.apache.org/tapestry/3.0.3/doc/TapestryUsersGuide/configuration.extensions.html
"  org.apache.tapestry.property-source (IPropertySource 
<../api/org/apache/tapestry/engine/IPropertySource.html>)
     This extension is fit into the configuration property search path, 
after the servlet context, but before JVM system           properties. A 
typical use would be to access some set of configuration properties 
stored in a database.
"
Can anyone give an example?

Thanks
Sean

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