开发者

problem with f:selectItems

I have used the following code to populate the selectbox. The code is

   <h:form id="myForm" prependId="false">
   <h:selectOneMenu  id ="user" value="#{customer.userName}"  >
         <f:selectItem itemLabel="Select One" itemValue="Jose" /> 
         <f:selectItems value="#{customer.perInfoAll}" var="model" itemValue="#{model.userName}" itemLabel="#{model.userName}" />
        </h:selectOneMen开发者_Go百科u >   
   </h:form>

the itemLabel is showing me the correct string value, but the itemValue property for each option is showing me the list I get from the listener. Please correct me.


<f:selectItems> accepts list of SelectItem which contains a value label pair.

Check the usage here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜