Hi,

I can't figure out why the following code results in "value is not a valid option":

<h:messages/>
<h:form>
 <t:selectOneMenu value="#{bean.opcao}" id="opcao">
   <f:selectItem itemLabel="Opção 1" itemValue="1"/>
   <f:selectItem itemLabel="Opção 2" itemValue="2"/>
   <f:selectItem itemLabel="Opção 3" itemValue="3"/>
 </t:selectOneMenu>
 <h:message for="opcao"/>
 <h:commandButton value="OK"/>
</h:form>

public class Bean {

   private Integer opcao;

   public Integer getOpcao() {
       return opcao;
   }

   public void setOpcao(Integer opcao) {
       this.opcao = opcao;
   }

}

Thanks,

Rafael Santini



Reply via email to