You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Chenini, Mohamed " <MC...@geico.com> on 2008/05/27 15:01:44 UTC

to limit the length of the drop down list in selectOneMenu in JSF

 

Hello ,

 

Could you, please, help on the following:

 

Is there a way to limit the length of the drop down list in
selectOneMenu in JSF.  I added size="10" but it is not working. The
print screen is from the user (who want only 10 values to be displayed
when he clicks on the down arrow).

 

Thanks.

 

<td>

   <select jsfc="h:selectOneMenu" id="state"
value="#{flowScope.previousQuoteBean.state}" size="10"
onchange="onRatedStateChange();" >

                                <f:selectItems
value="#{stateListLookupFacade.jsfStateListShortNamesWithSpecialMailingS
tates}"/>

   </select>#{bundle.searchpre_state_label}

</td>

 

Thanks,

Mohamed

 

 

 

====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.
====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.

Re: to limit the length of the drop down list in selectOneMenu in JSF

Posted by Andrew Robinson <an...@gmail.com>.
I wasn't entirely sure it would work, just a guess. Anyone else know
of a better solution?

On Wed, May 28, 2008 at 5:36 PM, Chenini, Mohamed <MC...@geico.com> wrote:
> Hi Andrew,
>
>
>
> I made the change you suggested, but 11 items are always shown (see below)
> when I click on down arrow even when I give different values to height.
>
>
>
> Am doing something wrong?
>
>
>
> <td>
>
>     <select jsfc="h:selectOneMenu" inlineStyle="height: 20px;" id="state"
> value="#{flowScope.previousQuoteBean.state}"
> onchange="onRatedStateChange();">
>
>
>
>
>
>
>
> Thanks,
>
>
>
> -----Original Message-----
> From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
> Sent: Wednesday, May 28, 2008 5:43 PM
> To: MyFaces Discussion
> Subject: Re: to limit the length of the drop down list in selectOneMenu in
> JSF
>
>
>
> use a skin or set inlineStyle="height: 20ex;" on the select one
>
> choice. AFAIK the "size" attribute cannot be set.
>
>
>
> On Tue, May 27, 2008 at 7:01 AM, Chenini, Mohamed <MC...@geico.com>
> wrote:
>
>>
>
>>
>
>> Hello ,
>
>>
>
>>
>
>>
>
>> Could you, please, help on the following:
>
>>
>
>>
>
>>
>
>> Is there a way to limit the length of the drop down list in selectOneMenu
>> in
>
>> JSF.  I added size="10" but it is not working. The print screen is from
>> the
>
>> user (who want only 10 values to be displayed when he clicks on the down
>
>> arrow).
>
>>
>
>>
>
>>
>
>> Thanks.
>
>>
>
>>
>
>>
>
>> <td>
>
>>
>
>>    <select jsfc="h:selectOneMenu" id="state"
>
>> value="#{flowScope.previousQuoteBean.state}" size="10"
>
>> onchange="onRatedStateChange();" >
>
>>
>
>>                                 <f:selectItems
>
>>
>> value="#{stateListLookupFacade.jsfStateListShortNamesWithSpecialMailingStates}"/>
>
>>
>
>>    </select>#{bundle.searchpre_state_label}
>
>>
>
>> </td>
>
>>
>
>>
>
>>
>
>> Thanks,
>
>>
>
>> Mohamed
>
>
>
> ====================
> This email/fax message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution of this
> email/fax is prohibited. If you are not the intended recipient, please
> destroy all paper and electronic copies of the original message.
>

RE: to limit the length of the drop down list in selectOneMenu in JSF

Posted by "Chenini, Mohamed " <MC...@geico.com>.
Hi Andrew,

 

I made the change you suggested, but 11 items are always shown (see
below) when I click on down arrow even when I give different values to
height.

 

Am doing something wrong?

 

<td>

    <select jsfc="h:selectOneMenu" inlineStyle="height: 20px;"
id="state"  value="#{flowScope.previousQuoteBean.state}"
onchange="onRatedStateChange();">

                                

 

 

 

Thanks,

 

-----Original Message-----
From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com] 
Sent: Wednesday, May 28, 2008 5:43 PM
To: MyFaces Discussion
Subject: Re: to limit the length of the drop down list in selectOneMenu
in JSF

 

use a skin or set inlineStyle="height: 20ex;" on the select one

choice. AFAIK the "size" attribute cannot be set.

 

On Tue, May 27, 2008 at 7:01 AM, Chenini, Mohamed <MC...@geico.com>
wrote:

> 

> 

> Hello ,

> 

> 

> 

> Could you, please, help on the following:

> 

> 

> 

> Is there a way to limit the length of the drop down list in
selectOneMenu in

> JSF.  I added size="10" but it is not working. The print screen is
from the

> user (who want only 10 values to be displayed when he clicks on the
down

> arrow).

> 

> 

> 

> Thanks.

> 

> 

> 

> <td>

> 

>    <select jsfc="h:selectOneMenu" id="state"

> value="#{flowScope.previousQuoteBean.state}" size="10"

> onchange="onRatedStateChange();" >

> 

>                                 <f:selectItems

>
value="#{stateListLookupFacade.jsfStateListShortNamesWithSpecialMailingS
tates}"/>

> 

>    </select>#{bundle.searchpre_state_label}

> 

> </td>

> 

> 

> 

> Thanks,

> 

> Mohamed

 

====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.

Re: to limit the length of the drop down list in selectOneMenu in JSF

Posted by Andrew Robinson <an...@gmail.com>.
use a skin or set inlineStyle="height: 20ex;" on the select one
choice. AFAIK the "size" attribute cannot be set.

On Tue, May 27, 2008 at 7:01 AM, Chenini, Mohamed <MC...@geico.com> wrote:
>
>
> Hello ,
>
>
>
> Could you, please, help on the following:
>
>
>
> Is there a way to limit the length of the drop down list in selectOneMenu in
> JSF.  I added size="10" but it is not working. The print screen is from the
> user (who want only 10 values to be displayed when he clicks on the down
> arrow).
>
>
>
> Thanks.
>
>
>
> <td>
>
>    <select jsfc="h:selectOneMenu" id="state"
> value="#{flowScope.previousQuoteBean.state}" size="10"
> onchange="onRatedStateChange();" >
>
>                                 <f:selectItems
> value="#{stateListLookupFacade.jsfStateListShortNamesWithSpecialMailingStates}"/>
>
>    </select>#{bundle.searchpre_state_label}
>
> </td>
>
>
>
> Thanks,
>
> Mohamed
>
>
>
>
>
> ====================
>
> This email/fax message is for the sole use of the intended
>
> recipient(s) and may contain confidential and privileged information.
>
> Any unauthorized review, use, disclosure or distribution of this
>
> email/fax is prohibited. If you are not the intended recipient, please
>
> destroy all paper and electronic copies of the original message.
>
> ====================
> This email/fax message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution of this
> email/fax is prohibited. If you are not the intended recipient, please
> destroy all paper and electronic copies of the original message.
>