On Wed, Nov 10, 2010 at 2:21 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote:
> On Wed, 10 Nov 2010 19:26:18 -0200, hese <1024h...@gmail.com> wrote: > > ...and is it possible to pass parameters into the if evaluating function >> and receive a boolean/string back? >> > > Hi! > > You pass a parameter to the If parameter (and any other parameter of any > other component) using a binding. See > http://tapestry.apache.org/tapestry5.1/guide/parameters.html for more > information about bindings. If don't specify one, the default binding > specified by the parameter is used. For the value parameter of If, the > default binding is prop. It supports some expressions described in > http://tapestry.apache.org/tapestry5.1/guide/propexp.html. > > Anyway, follow Inge's advice, which is very wise and based: logic belongs > in classes, not in templates. That's a bit of what MVC means. > > Tapestry 4 uses OGNL as its expression binding, but Tapestry 5 has a > deliberately less powerful expression binding due to the approach stated > above. > > Less expressive, but not less powerful. T5's property expressions are type-safe and non-reflective, with no unwanted synchronization logic, so I'd call that a better than even trade! > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > > --------------------------------------------------------------------- > 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