In Tapestry 4, OGNL had to do a lot of heavy lifting, since you didn't have reloadable Java classes; thus I've seen lots of very complicated OGNL expressions mixed into T4 templates. That causes its own problems in terms of maintainability and brittleness in the face of refactoring.
Simply comparisons (==, !=, lt, gt, lteq, gteq) may make it into a future T5 but as of now I'd just code this as: <t:if test="showCustomerData"> ... </t:if> and public boolean getShowCustomerData() { return customer.getId() == 99; } ... and there you have a more readable template, where instead of an opaque expression, you have a mnemonic name. On Fri, Aug 6, 2010 at 4:27 AM, Steve Eynon <steve.ey...@alienfactory.co.uk>wrote: > Yeah, I keep forgetting about the non-null binding to a boolean true > (see Notes section in the IF component docs) - a really cool idea! > -- > Steve Eynon > > > > On 5 August 2010 18:33, based2 <ba...@free.fr> wrote: > > > > > http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/If.html > > > > > > Angelo Chen wrote: > >> > >> Hi, > >> is it possible to use an expression in the t:if? something like this > >> > >> < t:if test="user.id=99"> > >> < /t:if> > >> > >> ? > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com