Hi Thiago, thanks for the quick reply, I'd already seen the official tapestry property expressions page but as there's no examples given there I was hoping there was something else buried in one of the wiki pages?
I'll take your advise and move this logic to the java class, I'm going to have a lot of helper methods for the logic that was attached to the various fields on my form, but I guess I can't be avoided. Regards, Brian. On 25 October 2011 14:46, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > On Tue, 25 Oct 2011 12:14:47 -0200, Brian Long <bl...@annadaletech.com> > wrote: > >> Hi all, > > Hi! > >> was hoping someone could point me in the direction on a good tutorial > > on the new property expressions in tapestry 5.2.6? > > http://tapestry.apache.org/property-expressions.html > >> I was using OGNL >> previously and would like to update these expression to work with >> ANTLR instead. > > What do you mean by "to update these expression to work with ANTLR"? I'm not > following you. And don't forget that you can add your own binding > implementations in Tapestry. prop (property expressions) is just one of > them. > >> <t:textfield t:id="surname" t:value="surname" class="${ognl:surname == >> null ? 'touch-and-type' : ''}" /> >> > > Easy: > > <t:textfield t:id="surname" t:value="surname" class="${surnameCssClass}"/> > > public String getSurnameCssClass() { > return surname == > null ? 'touch-and-type' : ''; > } > > Logic should be on Java classes, not templates. That's the Tapestry 5 > philosophy (MVC's too). > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and > instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org