Hi Boris, in my opinion it makes the tml less complicated and much more readable. Cause you don't have to look into java for just setting a css-class to an element.

In my case I tried to add a simple navigation with 3 elements and want to highlight the currently selected:

<ul>
<li><t:eventlink t:event="jump" t:context="literal:0" class="${cond:first, selected}">First</t:eventlink></li> <li><t:eventlink t:event="jump" t:context="literal:1" class="${cond:second, selected}">Second</t:eventlink></li> <li><t:eventlink t:event="jump" t:context="literal:2" class="${cond:third, selected}">Third</t:eventlink></li>
</ul>

In my Java-Page-Class I already had those three methods (isFirst...), so there was no extra programming.

in grails: http://stackoverflow.com/questions/7437774/inline-if-statement-in-grails
in jsp: http://hscripts.com/tutorials/jsp/operators/conditionalopr.php




On 17.11.2013 18:32, Boris Horvat wrote:
But why would you want that? I can see the benefit but I am afraid that
that will just make your tml more complicated where in my mind logic like
that belongs in .java

just my 2 cents

cheers


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

Reply via email to