tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <j...@apache.org>
Subject [jira] Created: (TAP5-842) Add a conditional clause to IoC Symbol evaluation
Date Wed, 16 Sep 2009 00:44:57 GMT
Add a conditional clause to IoC Symbol evaluation

                 Key: TAP5-842
                 URL: https://issues.apache.org/jira/browse/TAP5-842
             Project: Tapestry 5
          Issue Type: New Feature
          Components: tapestry-ioc
    Affects Versions:
            Reporter: Howard M. Lewis Ship

It's very common to want to do some extra, extra late binding of symbols ... generally, to
configure things one way for production mode and another way for development mode.

A symbol syntax such as

${foo ? bar  : baz }

(whitespace optional and ignored)

could be used for this (common) situation.  First symbol foo is evaluated and coerced to Boolean,
this selects either 'bar' or 'baz' which are then evaluated as symbols.  Thus:

foo.delay.production=1 h
foo.delay.development=1 s
foo.delay = ${tapestry.production-mode ? foo.delay.production : foo.delay.development}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message