Stop on ognl, prop is not powerful.

Creating java method
public boolean isSufficientPlayers() { return playersOnline > 100; }
instead
ognl:playersOnline > 100
is not good idea
1. You move presentation in to java code
2. You lost control on viewable presentation code, 100 or 50 or 1000 
palyersOnline...
3. Less usability
4. Don't wait future release of tapestry, maybe it will be in 2010 or
2011 :), but feature have needed yesterday

Friday, September 25, 2009, 3:39:35 AM, you wrote:

HLS> For the meantime, yes, move your code to Java code:

HLS> <t:if test="sufficientPlayers"> ...

HLS> public boolean isSufficientPlayers() { return playersOnline > 100; }

HLS> This is not so terrible because of live class reloading.

HLS> A future release of Tapestry will likely include a few more basic
HLS> comparison operators.

HLS> On Wed, Sep 23, 2009 at 11:06 PM, Kalle Korhonen
HLS> <kalle.o.korho...@gmail.com> wrote:
>>
>> On Wed, Sep 23, 2009 at 10:23 PM, Gunnar Eketrapp
>> <gunnar.eketr...@gmail.com> wrote:
>> > I often come across JSP code like ...
>> > <c:when test="${ playersOnline > 100 }">
>> > According to my understanding T5 does not support expressions in the test
>> > parameter. Correct?
>> > Now I am coding a test method in the java class for each such case. Is 
>> > there
>> > a smarter solution?
>>
>> You could use ognl
>> (http://chenillekit.codehaus.org/chenillekit-tapestry/ognlbinding.html),
>> but I'd argue that coding the test method in the class is the smart
>> choice. It keeps your template clean from potentially complex logic
>> and since the changes in the page class are reloaded automatically (in
>> development mode), you don't loose anything compared to jsp.
>>
>> Kalle
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>



HLS> --
HLS> Howard M. Lewis Ship

HLS> Creator of Apache Tapestry

HLS> The source for Tapestry training, mentoring and support. Contact me to
HLS> learn how I can get you up and productive in Tapestry fast!

HLS> (971) 678-5210
HLS> http://howardlewisship.com

HLS> ---------------------------------------------------------------------
HLS> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
HLS> For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Best regards,
 Sergey                            mailto:ayr...@ngs.ru


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to