You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "ross.efi" <ro...@att.net> on 2009/09/15 19:58:13 UTC

Simulating the humanizing label generation

Rather than using a BeanDisplay to show a few fields from a bean, what if I
want a table with a few th and td tags.  The td tag would just contain the
field referenced as ${bean.property}.   Is there a way to auto generate a
nice label for the th tag without adding a bunch of message catalog entries? 
Basically, is there a component to humanize the property name?

Thanks

Ross
-- 
View this message in context: http://www.nabble.com/Simulating-the-humanizing-label-generation-tp25458826p25458826.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Simulating the humanizing label generation

Posted by Norman Franke <no...@myasd.com>.
I've wanted the same thing. Seems common things like that should have  
a public interface.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Sep 15, 2009, at 2:17 PM, Thiago H. de Paula Figueiredo wrote:

> Em Tue, 15 Sep 2009 14:58:13 -0300, ross.efi <ro...@att.net>  
> escreveu:
>
>> Rather than using a BeanDisplay to show a few fields from a bean,  
>> what if I want a table with a few th and td tags.  The td tag would  
>> just contain the field referenced as ${bean.property}.   Is there a  
>> way to auto generate a
>> nice label for the th tag without adding a bunch of message catalog  
>> entries? Basically, is there a component to humanize the property  
>> name?
>
> Tapestry itself uses TapestryInternalUtils.toUserPresentable(String  
> propertyName). This class is internal, so be warned that it can be  
> changed between releases and no backward compatibility is guaranteed.
>
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


Re: Simulating the humanizing label generation

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 15 Sep 2009 14:58:13 -0300, ross.efi <ro...@att.net> escreveu:

> Rather than using a BeanDisplay to show a few fields from a bean, what  
> if I want a table with a few th and td tags.  The td tag would just  
> contain the field referenced as ${bean.property}.   Is there a way to  
> auto generate a
> nice label for the th tag without adding a bunch of message catalog  
> entries? Basically, is there a component to humanize the property name?

Tapestry itself uses TapestryInternalUtils.toUserPresentable(String  
propertyName). This class is internal, so be warned that it can be changed  
between releases and no backward compatibility is guaranteed.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org