[jboss-user] [EJB 3.0] - Getting values out of a selectOneMenu

vandriesschet do-not-reply at jboss.com
Thu Dec 18 13:30:09 EST 2008


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197438#4197438

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197438



More information about the jboss-user mailing list