1 Reply Latest reply on Jan 18, 2012 2:00 PM by lobo369

    Suggestion Box unexpected error

    lobo369 Newbie



      I'm using RichFaces 3.3.2 SR1 with Faceletes and JSF 1.2 RI .  and IE7


      When I type a word into de suggestion box the list displayed without problems. But when I click to select one item list some times ocurr a JS error, others just don't happens any and other select the item and update the h:inputText. I need that always the selected item populate the inputtext.





        <h:inputText value="#{obj.value}" rendered="#{obj.dto.tipoCampo==1 || obj.dto.tipoCampo==3}" 
         <a4j:support  event="onchange" ajaxSingle="true" reRender="tablaFiltro"/>
        <rich:suggestionbox rendered="#{obj.dto.tipoCampo==3}"
             nothingLabel="Sin resultados">
             <a4j:support  event="onselect" reRender="tablaFiltro"/>
              <h:outputText value="#{val.value}" />
              <h:outputText value="#{val.description}" />
        <h:selectOneMenu value="#{obj.value}" rendered="#{obj.dto.tipoCampo==2}" id="SOM_FILTRO_#{obj.dto.parametro}" >
         <f:selectItems value="#{obj.catalog}"/>
         <a4j:support  event="onchange" ajaxSingle="true" reRender="tablaFiltro"/>  
        <h:selectManyCheckbox value="#{obj.values}" rendered="#{obj.dto.tipoCampo==4}" 
         <f:selectItems value="#{obj.catalog}"/>   
         <a4j:support  event="onclick" ajaxSingle="true" />   


      If I select the items with arrow keys I don't have problem.


      In a4j:log don't appear anything. (with WARN level)


      I don't use any own JS.

        • 1. Re: Suggestion Box unexpected error
          lobo369 Newbie

          Finally I can get the problem.


          The problem is a conflict with <a4j:support  event="onchange" ajaxSingle="true" /> . in InputText component.


          The event "onchange" was fired when the user click outside the input field (when click on the suggestion list).


          I only disabled the onchange event and all be fine. Well the problem is that now I need to send all the components and not only the inputtext.