0 Replies Latest reply on Dec 18, 2008 1:30 PM by Thomas Van Driessche

    Getting values out of a selectOneMenu

    Thomas Van Driessche Newbie

      Hi,

      I'm building a warhammer online library for users.
      When i want to save a new model, i needed to select a race, modeltype and section from comboboxes.

      I do this lik this:

      <h:outputLabel value="Select a race for your model:"></h:outputLabel>
      <h:selectOneMenu value="#{saveModel.race}">
      <f:selectItems value="#{saveModel.races}"></f:selectItems>
      </h:selectOneMenu>

      i have a field race in my session bean with a setter and getter and i filled the selectOneMenu by adding selectitems to them with a object of race in it.

      Now when i want to save it i'm doing this:

      <h:commandButton value="create model" action="#{saveModel.saveCurrentModel}" />

      the problem is that he's not going in to that method and i get this output:

      sourceId=j_id4:j_id11[severity=(ERROR 2), summary=(Conversion Error setting value 'friesjes' for 'null Converter'. ), detail=(Conversion Error setting value 'friesjes' for 'null Converter'. )]

      sourceId=j_id4:j_id21[severity=(ERROR 2), summary=(Conversion Error setting value 'type1' for 'null Converter'. ), detail=(Conversion Error setting value 'type1' for 'null Converter'. )]

      sourceId=j_id4:j_id16[severity=(ERROR 2), summary=(Conversion Error setting value 'section1' for 'null Converter'. ), detail=(Conversion Error setting value 'section1' for 'null Converter'. )]
      ;|WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.


      I can't figure out what i'm doing wrong...
      Any help?