5 Replies Latest reply on Oct 16, 2007 10:46 AM by Ronald van Kuijk

    Still combox box

    Laurent Michenaud Newbie

      Hi,

      I've read before the post about combo box but i still
      don't understand why my solution doesnot work.

      I have replaced :

      <h:inputText value="#{var['type']}" required="true"/>

      with :
      <h:selectOneMenu required="true">
       <f:selectItem itemValue=""></f:selectItem>
       <f:selectItem itemValue="Type1"></f:selectItem>
       <f:selectItem itemValue="Type2"></f:selectItem>
       <f:selectItem itemValue="Type3"></f:selectItem>
       </h:selectOneMenu>


      And i manage the selected value of the combo with some javascript :

      <h:outputText>

      for ( i = 0; i &lt; document.forms[1].elements[2].options.length; i++ ) {
      if ( document.forms[1].elements[2].options.value == '#{var['type']}' ) {
      document.forms[1].elements[2].selectedIndex = i ;
      }
      }

      </h:outputText>

      When i submit the form with no value entered, i get the validation
      error, so it's ok.

      But when i submit the form with a selected item, i get this error :

      The message is: missing task variables: type


      So, i think my combo value is not well mapped with the
      jbpm variable but i don't understand why.