I'm trying build a generic code suggestionAction method, and to do so, I need the ability to pass a constant to that method. Is there a way to do this?
For example, something like this:
<rich:suggestionbox height="120" width="400" usingSuggestObjects="true" onselect="setSuggestion(#{rich:component('suggestion')});" suggestionAction="#{CodeCacheBean.autocomplete('CDOFFNSE')}" var="offense" for="offenseSearch" fetchValue="#{offense.code.value}" id="suggestion" minChars="3" nothingLabel="No Matches"> <h:column> <h:outputText value="#{offense.code.value}"/> </h:column> <h:column> <h:outputText value="#{offense.description}"/> </h:column> </rich:suggestionbox>
public List<CodeSearchBean> autocomplete(Object searchString, String codeName) { }
Nevermind, I just found this forum post:
http://jboss.com/index.html?module=bb&op=viewtopic&t=123319
In this post, Ilya explains exactly how to pull this off.
Thanks Ilya!!