5 Replies Latest reply on Mar 11, 2007 6:46 PM by Pete Muir

    Using s:selectItems with h:selectOneMenu - value is NULL

    Peter Salomonsen Newbie


      I have this code:

      <h:selectOneMenu value="#{projectManager.newProjectTargetGroup}">
       <s:selectItems value="#{targetGroups}" noSelectionLabel="Please select.." var="targetGroup" label="#{targetGroup.name}" />
       <s:button value="Add" action="#{projectManager.addTargetGroupToProject}" />

      The combobox displays fine with all the values correct - but when projectManager.addTargetGroupToProject is invoked the projectManager.newProjectTargetGroup property is NULL.

      What is the correct approach for getting the selected value into the selectOneMenu value reference.