You must either define an implicit converter "for-class" MyObject in
your jsf-config.xml, or use and explicit converter in your
h:selectOneListBox.
In case of implicit convertion, type of #{myBackingBean.listBoxValue}
will be used to decide what converter to use.
Regards,
David Delbecq
Evgeniy Karimov a écrit :
Hi, I have some problem:
Say I have
<h:selectOneListBox value="#{myBackingBean.listBoxValue}" ... >
<f:selectItems value="#{myBackingBean.listBoxValuesList}">
</h:selectOneListBox>
Where myBackingBean.listBoxValue is of type MyObject.
And myBackingBean.listBoxValuesList is ArrayList<SelectItem>, which items are
constructed as:
new SelectItem(myObj, myObj.getDescription(), myObj.getDescription()), where
myObj is type of MyObject.
Everything looks fine, but I get an exception with some message like: "Value is no
String ... does not have a Converter". Seems like myBackingBean.listBoxValue must be
of String type, but this isn't logical because first argument of SelectItem constructor
is of Object type, so it _should_ be possible to use MyObject as a value of ListBox,
isn't it?
Thanks in advance.