1 Reply Latest reply on Jun 21, 2007 2:38 AM by ilya_shaikovsky

    rich:suggestionbox submit filed after choosing item

    denis.tsyplakov

      Hi,

      I have following code

       <h:inputText
       value="#{legalEntitySelector.filterPattern}"
       id="inp_text_le">
       </h:inputText>
       <rich:suggestionbox
       for="inp_text_le"
       suggestionAction="#{legalEntitySelector.suggest}"
       ignoreDupResponses="true"
       requestDelay="300"
       reRender="origBankSelection"
       var="sg_item">
       <h:column>
       <h:outputText value="#{sg_item.legalName}"/>
       </h:column>
       </rich:suggestionbox>


      I need to submit choosen item value instantly. So I could rerender origBankSelection panel.

      How I could implement this. RichFaces examples contains following code with ajax listener

       <rich:suggestionbox id="suggestionBoxId" for="text" tokens=",["
       rules="#{suggestionBox.rules}"
       suggestionAction="#{suggestionBox.autocomplete}" var="result"
       fetchValue="#{result.text}" rows="#{suggestionBox.intRows}"
       first="#{suggestionBox.intFirst}"
       minChars="#{suggestionBox.minchars}"
       shadowOpacity="#{suggestionBox.shadowOpacity}"
       border="#{suggestionBox.border}"
       width="#{suggestionBox.width}"
       height="#{suggestionBox.height}"
       shadowDepth="#{suggestionBox.shadowDepth}"
       cellpadding="#{suggestionBox.cellpadding}">
      
       <a4j:ajaxListener type="org.richfaces.AjaxListener"/>
       <h:column>
       <h:outputText value="#{result.text}"/>
       </h:column>
       </rich:suggestionbox>
      


      But I did not manager to run this becouse ajaxListener requires to be inserted into ajax container.