You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "luther.baker" <lu...@gmail.com> on 2009/01/20 01:23:45 UTC
t:Select
I would like to display an html select drop down based on an enum ... works
perfectly.
Now concerning, the first or *blank*value - I'd like to replace it with some
text like "... choose one".
So, if using <t:Select id="enumValue"/>, is there a way I can add an option
... and make sure it shows up at the top of the select element?
Thanks,
-Luther
--
View this message in context: http://www.nabble.com/t%3ASelect-tp21554690p21554690.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: t:Select
Posted by Luther Baker <lu...@gmail.com>.
Whoa nice. I missed the blankLabel parameter.
Gracias Thiago - thanks for being such an active member here.
-Luther
On Jan 19, 2009, at 7:41 PM, Thiago H. de Paula Figueiredo wrote:
> Em Mon, 19 Jan 2009 21:23:45 -0300, luther.baker <lutherbaker@gmail.com
> > escreveu:
>
>> Now concerning, the first or *blank*value - I'd like to replace it
>> with some text like "... choose one".
>
> Try the blankLabel parameter: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
> .
>
>> So, if using <t:Select id="enumValue"/>, is there a way I can add
>> an option ... and make sure it shows up at the top of the select
>> element?
>
> Or put enumValue-blanklabel in your app.properties.
>
> To make sure it appers, set the parameter blankOption="always".
>
> --
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: t:Select
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 20 Jan 2009 12:20:00 -0300, luther.baker <lu...@gmail.com>
escreveu:
> Is there also a way to apply unique CSS to this first option as well?
That's why the OptionModel.getAttributes() method exists
(http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/OptionModel.html#getAttributes()).
In this case, you have to pass the null (blank) option explicitly in the
SelectModel passed to the Select component. I can't think of another way.
--
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: t:Select
Posted by "luther.baker" <lu...@gmail.com>.
Is there also a way to apply unique CSS to this first option as well?
-Luther
Thiago HP wrote:
>
> Em Mon, 19 Jan 2009 21:23:45 -0300, luther.baker <lu...@gmail.com>
> escreveu:
>
>> Now concerning, the first or *blank*value - I'd like to replace it with
>> some text like "... choose one".
>
> Try the blankLabel parameter:
> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html.
>
>> So, if using <t:Select id="enumValue"/>, is there a way I can add an
>> option ... and make sure it shows up at the top of the select element?
>
> Or put enumValue-blanklabel in your app.properties.
>
> To make sure it appers, set the parameter blankOption="always".
>
> --
> 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
>
>
>
--
View this message in context: http://www.nabble.com/t%3ASelect-tp21554690p21565137.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: t:Select
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Mon, 19 Jan 2009 21:23:45 -0300, luther.baker <lu...@gmail.com>
escreveu:
> Now concerning, the first or *blank*value - I'd like to replace it with
> some text like "... choose one".
Try the blankLabel parameter:
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html.
> So, if using <t:Select id="enumValue"/>, is there a way I can add an
> option ... and make sure it shows up at the top of the select element?
Or put enumValue-blanklabel in your app.properties.
To make sure it appers, set the parameter blankOption="always".
--
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