You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Muhammad Gelbana <m....@gmail.com> on 2013/01/31 15:48:03 UTC

[t5.3.6] Is it possible to contribute a SelectModel ?

I have some ValueEncoders contributed but one of these encoders is for an *
enum*, is it possible contribute a SelectModel for that enum too ? Because
I need to override the displayed name for the enum values.

Thanks.

Re: [t5.3.6] Is it possible to contribute a SelectModel ?

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 01 Feb 2013 23:16:56 -0200, Muhammad Gelbana <m....@gmail.com>  
wrote:

> Thanks a lot :)

;)

> But isn't their a tapestry way to have a common SelectModel for a  
> specific type other than enums ?

Nope. The Select component would need to be changed and a service for  
providing SelectModels would need to be created. You can file an  
enhancement JIRA.

-- 
Thiago H. de Paula Figueiredo

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


Re: [t5.3.6] Is it possible to contribute a SelectModel ?

Posted by Muhammad Gelbana <m....@gmail.com>.
Thanks a lot :)
But isn't their a tapestry way to have a common SelectModel for a specific
type other than enums ?

On Thu, Jan 31, 2013 at 8:35 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Thu, 31 Jan 2013 15:06:59 -0200, Muhammad Gelbana <m....@gmail.com>
> wrote:
>
>  Thanks. I know how to contribute a ValueEncoder but I don't know where to
>> contribute a SelectModel !
>>
>
> You don't contribute SelectModels. You need to specify them in each
> component that uses it. In addition, the name (label) for each enum value
> can be defined in your app.properties:
>
> NameOfTheEnumClass.**NameOfTheValue-label=Nice label
>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [t5.3.6] Is it possible to contribute a SelectModel ?

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 31 Jan 2013 15:06:59 -0200, Muhammad Gelbana <m....@gmail.com>  
wrote:

> Thanks. I know how to contribute a ValueEncoder but I don't know where to
> contribute a SelectModel !

You don't contribute SelectModels. You need to specify them in each  
component that uses it. In addition, the name (label) for each enum value  
can be defined in your app.properties:

NameOfTheEnumClass.NameOfTheValue-label=Nice label

-- 
Thiago H. de Paula Figueiredo

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


Re: [t5.3.6] Is it possible to contribute a SelectModel ?

Posted by Muhammad Gelbana <m....@gmail.com>.
Thanks. I know how to contribute a ValueEncoder but I don't know where to
contribute a SelectModel !



On Thu, Jan 31, 2013 at 6:26 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Thu, 31 Jan 2013 12:48:03 -0200, Muhammad Gelbana <m....@gmail.com>
> wrote:
>
>  I have some ValueEncoders contributed but one of these encoders is for an
>> * enum*, is it possible contribute a SelectModel for that enum too ?
>> Because I need to override the displayed name for the enum values.
>>
>
> Just use override() instead of add() when contributing it. Ordinary
> Tapestry-IoC mapped configuration override.
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [t5.3.6] Is it possible to contribute a SelectModel ?

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 31 Jan 2013 12:48:03 -0200, Muhammad Gelbana <m....@gmail.com>  
wrote:

> I have some ValueEncoders contributed but one of these encoders is for  
> an * enum*, is it possible contribute a SelectModel for that enum too ?  
> Because I need to override the displayed name for the enum values.

Just use override() instead of add() when contributing it. Ordinary  
Tapestry-IoC mapped configuration override.

-- 
Thiago H. de Paula Figueiredo

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