2 Replies Latest reply: Apr 20, 2012 8:58 AM by Ani Capil RSS

How to put enum+string value in specific oreder in selectOneMenu.

Ani Capil Newbie

Hi!

I want to pu 'All' at the bottom of dropDown. I have A Enum with two values 1) ModelText 2) SellingText and want to put "All" at the bottom.

I can place "at the top with the help of noSelectionLabel="All" but not vice versa. Appriciate any help....  thousends of thanks.

 

# this is my code : works but "All" comes on the top :-(

<div>

            <h:outputLabel for="textType" value="#{msg['informations.model.texttype.label']}"/>

            <h:selectOneMenu id="textType" value="#{textStatusReportItem.textType}"

                             label="#{msg['informations.model.texttype.label']}">

                <s:selectItems value="#{textTypeList}" var="textType" label="#{textType.name}" noSelectionLabel="All"/>

                <s:convertEnum/>

            </h:selectOneMenu>

        </div>

 

# i want to do like this...

 

I refactored like this without success :-(

<s:selectItems value="#{textTypeList}" var="textType" label="#{textType.name}"/>

<f:selectItem itemLabel="ALL" itemValue=""/>