-
1. Re: SuggestionBox problem
andrewwheeler Jun 9, 2010 9:17 PM (in response to ibstmt)First off your inputText does not have a value property. However I tend to skip the action listener. I use seam's extended el (actions with parameters) with an Ajax call to your backing bean.
<a4j:support event="onselect" ajaxSingle="true" bypassUpdates="true" action="#{siteManager.setSearchResult(result.id)}"/>
You can pass any value you want. In my case I don't want the text value of the search result but the underlying id of the search entity such as a person or company. You can then re-render any ajax enabled area or component on your page using reRender if required. The ajaxSingle and bypassUpdates means no other values will be submitted and validation will not take place.
-
2. Re: SuggestionBox problem
ibstmt Jun 10, 2010 8:28 AM (in response to ibstmt)Thanks, but that doesn't work. I have tried three or four techniques for this, but the Ajax event simply refuses to fire for the suggestion box, no matter what. There's a h:selectOneMenu component right above it which also uses a4j:support to fire an action, and that works fine. It's just the rich:suggestionbox that won't do it.
I might add that my page is a .xhtml page. I am wondering if there is some issue related to that.
-
3. Re: SuggestionBox problem
ibstmt Jun 10, 2010 8:43 AM (in response to ibstmt)Also note that I've got a command button at the bottom of my form:
<a4j:commandButton value="Add" reRender="resultsPanel" action="#{myAction}"/>
When I click that, then the action specified in the suggestionbox Ajax event fires.