1 Reply Latest reply on Mar 18, 2008 6:27 PM by asookazian

    using one suggestionBox with multiple input boxes

    asookazian

      how do you do this? there is no example in richfaces doc to demonstrate the use of the for attribute in the case of multiple components using the same suggestionbox as below (doesn't work):

      <h:form id="locationform">
       <b style="font-size: 14px"><u><h:outputText id="techLocname" value="#{techDeployToUser.techLocationName}"></h:outputText></u></b>
       <h:inputText id="userlocationno1" value="#{techDeployToUser.locNo}" valueChangeListener="#{techDeployToUser.validateUserLocation}" maxlength="4" size="26"/>
       <h:inputText id="userlocationno2" value="#{techDeployToUser.locNo}" valueChangeListener="#{techDeployToUser.validateUserLocation}" maxlength="4" size="26"/>
       <h:inputText id="userlocationno3" value="#{techDeployToUser.locNo}" valueChangeListener="#{techDeployToUser.validateUserLocation}" maxlength="4" size="26">
       <a4j:support event="onblur" oncomplete="return clearUserLocMsg();" reRender="userQueueTable, userLocMsg, techLocMsg, userlocname, assignButtonA4JForm, techQueueTable"/>
       <input type="hidden" name="inputlocno" value="#{techDeployToUser.locNo}"/>
       </h:inputText><br></br>
      
      
       <rich:suggestionbox id="suggestionboxid" width="182" height="80" ajaxSingle="true" limitToList="false" border="5" for="userlocationno1:userlocationno2:userlocationno3" suggestionAction="#{techDeployToUser.autoSuggestLocNosList}" var="locNosList" fetchValue="#{locNosList.locationNo}">
       <h:column>
       <b> <h:outputText id="sellocno" value="#{locNosList.locationNo}"></h:outputText> </b>
       </h:column>
       </rich:suggestionbox>
      
       </h:form>


        • 1. Re: using one suggestionBox with multiple input boxes
          asookazian

          I don't understand how I'd use the following rule for multiple components using the same suggestionbox...


          id (or full path of id's) of target components, for which this element must provide support. If a target component inside of the same <code>NamingContainer</code> (UIForm, UIData in base implementations), can be simple value of the "id" attribute. For other cases must include id's of <code>NamingContainer</code> components, separated by ':'. For search from the root of components, must be started with ':'.