This content has been marked as final.
Show 2 replies
-
1. Re: HtmlSelectOneMenu and HtmlAjaxSupport in java code
tkuprevich Oct 8, 2008 5:50 AM (in response to lgrden)Hi,
thank you for your information. I've created an issue — https://jira.jboss.org/jira/browse/RF-4574 -
2. Re: HtmlSelectOneMenu and HtmlAjaxSupport in java code
anders.norgaard Oct 8, 2008 6:51 AM (in response to lgrden)Hi, I had almost the same problem. My solution was to use rich:suggestionbox and a4j:support. I am not sure this is the optimal solution. You can tell me what you think.
The idea is that the cpeModel depends on which cpeVendor has been selected.<h:panelGrid columns="2" border="0" cellpadding="0" cellspacing="0"> <h:inputText required="false" value="#{cpevendor.name}" id="cpevendornameInput" onfocus="#{rich:component('fwvendorsuggestion')}.callSuggestion(true)"/> <h:graphicImage value="/img/arrow.png" onclick="#{rich:component('fwvendorsuggestion')}.callSuggestion(true)"/> </h:panelGrid> <rich:suggestionbox for="cpevendornameInput" suggestionAction="#{firmwaremanager.autocompleteVendor()}" var="vendor" id="fwvendorsuggestion"> <h:column> <h:outputText value="#{vendor.name}"/> </h:column> <a4j:support event="onselect" action="#{firmwaremanager.setCpeVendor(vendor)}">/a4j:support> </rich:suggestionbox> <h:panelGrid columns="2" border="0" cellpadding="0" cellspacing="0"> <h:inputText required="false" value="#{cpemodel.model}" id="cpemodelnameInput" onfocus="#{rich:component('fwmodelsuggestion')}.callSuggestion(true)"/> <h:graphicImage value="/img/arrow.png" onclick="#{rich:component('fwmodelsuggestion')}.callSuggestion(true)"/> </h:panelGrid> <rich:suggestionbox for="cpemodelnameInput" suggestionAction="#{firmwaremanager.autocompleteModel()}" var="model" id="fwmodelsuggestion"> <h:column> <h:outputText value="#{model.model}"/> </h:column> <a4j:support event="onselect" action="#{firmwaremanager.setCpeModel(model)}"></a4j:support> </rich:suggestionbox>
(some formatting removed, to make the code more clear)
Best,
Anders