On Wed, Oct 28, 2009 at 11:01 AM, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > Em Wed, 28 Oct 2009 11:49:39 -0200, ARD Marx Tobias > <tobias.marx...@daserste.de> escreveu: > >> Why are the following ognl expressions not supported anymore in the latest >> Tapestry5 version? > > 5.1.0.5? > >> ${method.getSomething()} >
This exists in 5.0.18. Note that the method must be public. This assumes you have a method named getMethod(), that is, a property named "method". > This works in 5.1.0.5. > >> ${method.getSomething(´some constant´)} Support for passing parameter values was added in 5.1. Previously you could only invoke zero-args methods. Thiago is right, however, that past a certain point, you will want to create a method in your Java class as this starts to severely break down the separation of concerns between the view and the controller, and leaves you increasingly open to refactoring errors. > > I don't know if the prop binding (the default one) supports this, by my > approach to this situation would be to create a getter method for it (say, > getSomethingX() and use ${somethingX} in the template. > >> ${ognl:method.getSomething(´some constant´)} > > You should add the ChenilleKit Tapestry package to use OGNL: > http://www.chenillekit.org/chenillekit-tapestry/index.html > >> and how does this work now? > > Almost anything can be implemented using a getter method. As the logic is in > a Java class, it's easier to write, debug and test. I don't use nor miss > OGNL expressions in Tapestry 5. :) > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org