On Sat, 21 Jul 2012 12:47:10 -0300, sommeralex <alexander.som...@gmail.com> 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(SymbolConstants.PRODUCTION_MODE) // or @Symbol("tapestry.production-mode"), works the same.
private boolean productionMode;

this way sounds much easier than the crpytic form in the constructor:
public class MyService implements MyServiceInterface
{
  public MyService(@Value("${tapestry.production-mode}") boolean
productionMode, ...)
  {
    if (productionMode) {

can someone explain me why app properties can not more easiliy requested?

Example of more easily requested way of doing that please. ;)

Do you really wanted an specific annotation just for injecting a single symbol?

You could also inject the SymbolSource service and get symbol values from it.

--
Thiago H. de Paula Figueiredo

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

Reply via email to