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.
--
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