JBoss Community

UISelectOne and selectOneMenu

created by yasser zairi in JBoss Tools - View the full discussion

hi everyone

i'm trying to get the selected item from a selectOneMenu by using UISelectOne but it doesn't work not even does it displey an error .

PS: the selectOneMenu is populated without a problem.

 

---------------------------------------------------------------

<a4j:outputPanel layout="block">

                <h:outputLabel value="Categorie :" />

                <h:selectOneMenu id="select_cat" value="#{valeursMBean.selected}" >

                    <f:selectItem itemLabel="--categorie"/>

                    <f:selectItems value="#{valeursMBean.categories}"/>

                </h:selectOneMenu>

</a4j:outputPanel>

 

<a4j:commandButton value="Search" reRender="table"

                action="#{valeursMBean.takeSelection}" />

---------------------------------------------------------------

private UISelectOne selected=new UISelectOne();

 

public void takeSelection() {

 

        System.out.println("value :  "+selected.getValue());

 

    }

---------------------------------------------------------------

but i don't get nth displayed in the Console.

any suggestions please ?

Regards

Reply to this message by going to Community

Start a new discussion in JBoss Tools at Community