With @Symbol you must use @Inject too

@Proeprty
@Inject
@Symbol(SymbolConstants.PRODUCTION_MODE)
private boolean productionMode

BTW you can also use :-

<t:if test='symbol:tapestry.production-mode'>
   ${symbol:tapestry.production-mode}
</t:if>

regards
Taha


On Jul 28, 2012, at 2:19 PM, sommeralex wrote:

> 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
> 
> <t:if test="productionMode">
>       
> productionMode!
>       
> </t:if>
> 
> 
> My FrontendModule
> 
> public static void contributeApplicationDefaults(MappedConfiguration<String,
> String> configuration) {
> 
> configuration.add("tapestry.production-mode", "true");
> 
> }
> 
> The String "productionMode!" is never printed. Using Tapestry 5.3.1.
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Test-if-production-or-test-mode-tp5714658p5714849.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to