"But this seems impossible..."  What do you mean by "this"? You can
certainly place properties into the application specification and
retrieve them from your app, the catch being that you need access to an
IRequestCycle to get it. Something like:

cycle.getRequestContext().getServlet().getApplicationSpecification().getProperty(propertyName)

If you mean that you want to place the config information into the
specification, and have tapestry auto-load all of the configuration
information for you, then, I don't know. :)  I'm inclined to agree with
Patrick... what's wrong with a traditional "properties" file approach?

Robert

sean gao wrote:
> can anybody help me on these two questions please?
> Thanks
> Sean
> 
>> <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: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to