I'm trying to implement the f:setActionPropertyListener approach to take the selected object and set it to my conversational entity bean (Seam 2.1.SP1).
However, I'm receiving conversion errors, such as:
Conversion Error setting value 'Administrator' for 'null Converter'.
Googling the issue, it would appear that I need to build a converter to take my selected object and return it as an object. But, if so, how come I don't have to do this for other selectItems wherein I set the value directly to that of an object? Here is my rich:suggestionBox if anyone would like to help me figure out whether I need to make a converter. Thank you.
Note: In the code below, {result} is a User object. {result.userProfile} is another object, "UserProfile", which is a child of Object.
{cvEventContact.contact } is of type UserProfile. So there should be no object mismatch going on.
Code:
<h:inputText id="contact" value="#{cvEventContact.contact}" required="true" autocomplete="true"/> <rich:suggestionbox id="userPicker" minChars="4" for="contact" tokens=",[]" suggestionAction="#{userPicker.getAllUsersByInput}" var="result" usingSuggestObjects="false" nothingLabel="#{messages['suggestions.nothingLabel']}" width="#{globals['output.suggestionBox.width']}" status="userPickerStatus"> <a4j:support event="onselect"> <f:setPropertyActionListener value="#{result.userProfile}" target="#{cvEventContact.contact}" /> </a4j:support> <h:column> <h:outputText value="#{result.fullName}"/> </h:column> <h:column> <h:outputText value="#{result.userId}"/> </h:column> <h:column> <h:outputText value="[#{result.primaryOrg.shortName}]"/> </h:column> </rich:suggestionbox>