Hi.

I'm using selectOneMenu to offer the user a city selection. Internally
the city objects are value objects that will be added to the selectitem
objects as value property. So every selectitem contains the "real" city
object. I've added a custom converter, that should convert from and to
these value objects directly.

<h:selectOneMenu id="city_selection" required="true"
value="#{registrationAction.city}"
rendered="#{registrationAction.showMultiCitySelection}">
<f:selectItems value="#{citySelection}" />
</h:selectOneMenu>

It works for "reading" the select items - they will be display in the
selectbox. When I place a breakpoint in the getAsString method of the
converter, it will be triggered. So the converter is used. But when I
submit the page, there's no object added to the
#{registrationAction.city} bean. It is null. The reason why, I think is
that the getAsObject method of the converter isn't invoked! I tested it
with a breakpoint in this method and it isn't triggered.

So my question: is the converter for the selectonemenu component not
triggered for input values?! I tried to find "the way up" from the
converter to the point where it is invoked. But I only found a call from
getConvertedUISelectManyValue not for selectonevalue or something.

Any hints?


regards,
Veit

Reply via email to