Re: Test if production or test mode..

2012-07-28 Thread Chris Mylonas
Hi - I took the liberty in creating a JIRA for adding this example to the symbols page. Handy example for someone getting into symbolic stuff (excuse my pun-tiness) https://issues.apache.org/jira/browse/TAP5-1982 Here is the documentation I reckon could do with some more http://tapestry.apache.o

Re: Test if production or test mode..

2012-07-28 Thread sommeralex
thank you very much, it works! 2012/7/28 Taha Hafeez [via Tapestry] < ml-node+s1045711n5714850...@n5.nabble.com> > With @Symbol you must use @Inject too > > @Proeprty > @Inject > @Symbol(SymbolConstants.PRODUCTION_MODE) > private boolean productionMode > > BTW you can also use :- > > >${symb

Re: Test if production or test mode..

2012-07-28 Thread Taha Siddiqi
With @Symbol you must use @Inject too @Proeprty @Inject @Symbol(SymbolConstants.PRODUCTION_MODE) private boolean productionMode BTW you can also use :- ${symbol:tapestry.production-mode} regards Taha On Jul 28, 2012, at 2:19 PM, sommeralex wrote: > Thank you all for your answers. > >

Re: Test if production or test mode..

2012-07-28 Thread sommeralex
Thank you all for your answers. What I now did is just this in one of my pages: JAVA @Property @Symbol("tapestry.production-mode") private boolean productionMode; TML productionMode! My FrontendModule public static void contributeApplicationDefaults(MappedConfigu

Re: Test if production or test mode..

2012-07-23 Thread Thiago H de Paula Figueiredo
On Sat, 21 Jul 2012 12:47:10 -0300, sommeralex wrote: @Value("${tapestry.production-mode}") @Property private boolean productionMode; You don't need @Property for injecting stuff. In addition, using @Symbol, you don't need to use expansions: @Inject @Symbol(Symbo

Re: Test if production or test mode..

2012-07-23 Thread Christian Riedel
…and if you worry about having too many annotations in the constructor, you can also omit the @Inject annoation for symbols in recent Tapestry versions (I think > 5.2). @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode Am 22.07.2012 um 15:34 schrieb Lance Java: > You can use @I

Re: Test if production or test mode..

2012-07-22 Thread Lance Java
You can use @Inject, @Value and @Symbol in tapestry services. @Property can only be used in pages and components, NOT services. The following should work in a service: @Inject @Symbol("tapestry.production-mode") private boolean productionMode; You could also do this: @Inject @Value("${tapestry.

Re: Test if production or test mode..

2012-07-21 Thread Howard Lewis Ship
There's very little in Tapestry that could not be readily built in Tapestry; it's not that what you are doing is impossible, it's just that there hasn't been a sufficient need to streamline access to this configuration symbol. On Sat, Jul 21, 2012 at 8:47 AM, sommeralex wrote: > @Value("$