Hi Rafael,
your itemValues are Strings, your bean expect Integer.
you can change the getter and setter to accept and return Strings
or try itemValue="#{1}", you may need to change from Integer to Number than.
Regards,
Volker
2009/7/21 SANTINI, Rafael <[email protected]>:
> 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
>
>
>
>
--
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de