On Thu, 31 Oct 2013 08:51:34 -0200, Chris Mylonas <ch...@opencsta.org>
wrote:
Hi Tapestry Users!
Hi!
How would I go about doing this (displaying certain enum values from the
type)?
Just like the way you'd do with any other Java class: pass a SelectModel
to it, probably using the SelectModelFactory service.
The t:select component reads the message catalog, however rendering in a
table (not a grid) seemed to ignore it. I progressed with it by calling
a helper method from the template with something like
${convertEnum(passedEnum)}
Grid uses property viewing blocks and there's one specific for enums that
looks up the labels in the exact same way as Select does. You can try
using the PropertyDisplay component to render the enum property with the
labels coming from app.properties. That's what Grid uses.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org