I am using something like this:
<h:inputText
id="suggest"
value="#{someBean.someStringValue}"
converter="#{myStringValueConverter}">
<a:support event="onblur" ajaxSingle="true"/>
</h:inputText>
<rich:suggestionbox for="suggest"
suggestionAction="#{suggestionInstance.suggestion}"
var="s"
fetchValue="#{s.someValue}"
ajaxSingle="true">
<h:column>
<h:outputText value="#{s.anotherValue}"/>
</h:column>
<h:column>
<h:outputText value="#{s.yetAnotherValue}"/>
</h:column>
<a:support event="onselect" ajaxSingle="true" reRender="target">
<f:setPropertyActionListener value="#{s}" target="#{someBean.someObject}" />
</a:support>
</rich:suggestionbox>
SetPropertyActionListener does the work you are looking for. I also have a converter on my input text, so the user can just enter something (UN location codes in my copy), and I can try to parse this in the converter into an object.
source
share