Hi Daniel,

I use the following sort of code:

SymbolProvider provider = new MySymbolProvider(File configFile);
ContributionDef contribution = new
org.apache.tapestry5.internal.SyntheticSymbolSourceContributionDef("MyConfig",
provider, "before:ApplicationDefaults");

...

RegistryBuilder builder = new RegistryBuilder();
builder.add(new
org.apache.tapestry5.internal.SyntheticModuleDef(contribution));

Note that I am using 2 internal package classes, so not guaranteed across
Tapestry versions, but it does work for me.

Richard

On 28 July 2015 at 14:31, Poggenpohl, Daniel <
daniel.poggenp...@isst.fraunhofer.de> wrote:

> Hello,
>
> I want to provide additional configuration on startup to my Tapestry
> application. I want to store the additional configuration in a file
> containing lines "key=value".
> I know I can contribute a symbol provider to load a file and access the
> symbols this way.
>
> But I can't find the documentation for
> - what method to write in the AppModule to contribute the Symbol Provider
> - How to write a Symbol Provider
>
> Can anyone help?
>
> Regards,
> Daniel P.
>



-- 

Richard Kirby, Technical Director

CAPDM Limited

Direct phone: 0131 477 8629

Email: r...@capdm.com  Website: www.capdm.com

Registered in Scotland: SC168970       VAT: 682 846 983

Registered address: 22 Forth Street, Edinburgh, EH1 3LH, UK

Reply via email to