0 Replies Latest reply on Nov 12, 2007 5:12 PM by Madhav Bhargava

    Prevent suggestionBox popup to show up on onblur event

    Madhav Bhargava Newbie

      Hi All,

      I am using suggestionBox component to auto-complete a text box. Here is the code:

      <a4j:region id="taRegion">
       <t:inputTextHelp value="#{uiQuickSearchListPopulator.quickSearchListController.selectedTA}" id="taSuggest" size="40" maxlength="255" >
       <a4j:support event="onblur" action="#{uiQuickSearchListPopulator.getLMFMADCountTA}"
       reRender="tooltipTA,taLMFCount,taMADCount,quickSearchName,quickTotLMFCount,quickTotMADCount"></a4j:support>
       </t:inputTextHelp>
       <rich:suggestionbox id="taSuggestBox" for="taSuggest" style ="font-size:12px" tokens="" frequency="0" selfRendered="true" ignoreDupResponses="true"
       rules="#{uiQuickSearchListPopulator.rules}"
       suggestionAction="#{uiQuickSearchListPopulator.autocompleteTA}" var="result"
       fetchValue="#{result.taName}" rows="#{uiQuickSearchListPopulator.intRows}"
       first="#{uiQuickSearchListPopulator.intFirst}"
       minChars="#{uiQuickSearchListPopulator.minchars}"
       shadowOpacity="#{uiQuickSearchListPopulator.shadowOpacity}"
       border="#{uiQuickSearchListPopulator.border}" width="#{uiQuickSearchListPopulator.width}"
       height="#{uiQuickSearchListPopulator.height}"
       shadowDepth="#{uiQuickSearchListPopulator.shadowDepth}"
       cellpadding="#{uiQuickSearchListPopulator.cellpadding}" >
       <h:column>
       <h:outputText value="#{result.taName}" />
       </h:column>
       </rich:suggestionbox>
       </a4j:region>
      



      There should ideally be 2 ways to use the auto-complete component:

      1. The user types in a few characters and then the component auto-completes by presenting a list of choices to select from.
      2. At the same time the component should allow user to type in the entire text and not show the window. This is required in cases where the user knows what he is looking for and can type that much faster than bringing up the popup frame.

      The problem is that with the above setup i am unable to stop the popup box with choices to come up even if the user types in something and tabs out to the next control on the page.


      Is there any way to stop the popup from occurring on event=onblur?