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 <1024h...@gmail.com>
Reply-to: "Tapestry users" <users@tapestry.apache.org>
To: users@tapestry.apache.org
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: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to