You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dmitriy Vsekhvalnov <dv...@gmail.com> on 2012/02/15 12:48:28 UTC

T5: localized message by property value

Hi everyone,

  dumb question, can i get 'message:' prefix working with properties? e.g.:

${message:report.reviewStatus}


where Report.getReviewStatus()  returns enumeration for instance?

Re: T5: localized message by property value

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 15 Feb 2012 10:18:57 -0200, Dmitriy Vsekhvalnov  
<dv...@gmail.com> wrote:

> Sure, i knew that :) that's so much pain to repeat again and again,
> i was hoping for expansions support, which seems so natural, right? ;)

You can always add your own bindings to Tapestry. ;)

-- 
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: localized message by property value

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 15 Feb 2012 09:48:28 -0200, Dmitriy Vsekhvalnov  
<dv...@gmail.com> wrote:

> Hi everyone,

Hi!

>   dumb question, can i get 'message:' prefix working with properties?  
> e.g.:
> ${message:report.reviewStatus}
> where Report.getReviewStatus()  returns enumeration for instance?

No, but you can @Inject Messages in your class and use its get(String key)  
method instead. The message binding is 100% static.

-- 
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org