So i am using seam to try to make a dropdown menu to add a delivery to a database. I'm using a drop down menu to select which employee from the database is doing the delivery. The menu loads all the employees in the database just fine but when I select one and click add, I get the error "Conversion Error setting value '(hash for employee)' for 'null Converter'.
here's the code for the dropdown menu:
<my:dropdown label="Employee ID" id="emp" value="#{deliveryPort.emp}" required="false">
<f:selectItem itemValue="#{null}" itemLabel="Selct One"/>
<s:selectItems value="#{deliveryPort.empList}" var="emp" label="# {emp.employeeId} #{ emp.nameFirst}"/>
</my:dropdown>
Any help would be greatly appreciated. Thank you
You should do 2 things to avoid this error:
emp
is implementing equals()
and hashCode()
BalusC wrote a nice tutorial about converters and how to use them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With