0
votes
<h:outputText value="#{subtech.technology.get(0).name}"
                rendered="#{not subtech.selected}" />
            <ace:selectMenu value="#{subTechBean.selTechnology}" 
                rendered="#{subtech.selected}">
                <f:selectItems value="#{subTechBean.technology}"></f:selectItems>
            </ace:selectMenu>

when I switch the value of selected to true using change buttons selectmenu appears.but with no value is pre-selected and if I didn't set the value and use the save button to see the outputtext,then the page shows •{0}: Validation Error: Value is not valid.

how to save the default value of selectMenu,so if I didn,t change the value it will use the default value.

1

1 Answers

0
votes

You can see an example of properly setting the ace:selectMenu value here: http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=selectMenuBean

If you wanted a default value before the user selected one, then in that example you could set a default value for the field in SelectMenuBean.