That's what I did finally! You're right about the fact that we're not
supposed to have logic in template, but personnaly I think  there as some
logics that don't worth a Getter. Imagine if my list contains 10 elements
through which I have to iterate, I'd be oblige to write 10 getters, I really
think that it's cumbersome. I might be wrong on this point if there is an
elegant solution to that problem.

> retrieve one element whose index I know. In T4 I'd invoke
> myList.getItem(index). I've tried ${myList.getItem(index)}, b ut didn't
> work. I'd appreciate if someone can tell me what I miss or the way to do

Try creating a getter in your page class:

public Item getItem() {
        return myList.getItem(index);
}

This has the upside of making the template simpler and your application  
more testable, as you almost don't have logic in templates, having them in  
Java code instead.
I used T4 before and I really don't miss OGNL in T5. But it is also a  
matter of personal choice, obviously.

Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
View this message in context: 
http://www.nabble.com/Using-methods-other-thang-getters-and-listeners-tp18569645p18571557.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to