In T5, 5.1 you can do something like this. In .tml:
<t:if test="showTitle">
<span>${reportTitle}</span>
...
<t:parameter name="else">
<span>No report to display</span>
</t:parameter>
</t:if>
and in .java:
public boolean isShowTitle() {
return reportId > 0;
}
I believe the "else" syntax may have changed in T5.2.
R.
-----Original Message-----
From: hese <[email protected]>
Reply-to: "Tapestry users" <[email protected]>
To: [email protected]
Subject: a simple <t:if> question
Date: Wed, 10 Nov 2010 13:24:23 -0800 (PST)
Hi,
I am using Tapestry 5. I see that in tapestry 4 it was possible to have
condition values in the if clause. Is something like this available in 5?
Is it possible to check for a particular string value in the t:if tag or is
it just boolean?
I want to do something like
if(str=='somevalue') {
} else {
}
Thanks
Hese
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]