11 Replies Latest reply on Oct 23, 2007 1:15 PM by nbelaevski

    SuggestionBox + h:inputText + entityConverter

    damianharvey

      I'm a bit stuck on how best to use the Richfaces Suggestion box with an EntityConverter.

      I'd like to use it in a similar fashion to the s:selectItem - in that it sets a field value to an entity (eg. setting CITY in PERSON) while displaying a label (eg. CITY.CITYNAME).

      The SuggestionBox returns it's value to an h:inputText. I've tried using the converter attribute of that and setting it to org.jboss.seam.EntityConverter. This doesn't work. The input box contains a value representing the entity (eg. com.something.somethingElse.City@798ef6) and when I save it a validation error is thrown "Selected item cannot be loaded from persistence context"

      Can anyone point me in the right direction?

      Thanks in advance,

      Damian.