On Fri, 31 Aug 2012 08:17:10 -0300, Christian Riedel
<cr.ml...@googlemail.com> wrote:
<t:if t:test="prop1">
<p:else>
<t:if t:test="prop2">
you mean this???
</t:if>
</p:else>
</t:if>
I really dislike this way of writing If's, as the else part is inside the
if and the indentation makes it very confusing. I recommend everyone doing
this instead:
<t:if t:test="prop1">
if
</t:if>
<t:if t:test="!prop1>
else
</t:if>
If your method that provides the test has expensive calls, just annotate
it with @Cached so Tapestry calls it only once per request and reuses the
returned value in subsequent calls.
I think the else parameter of the If component was only created because,
at that time, the prop binding didn't support the ! operator yet.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org