0 Replies Latest reply on Feb 21, 2008 8:30 AM by Johan BLEUZEN

    suggestionbox, doesn't refresh on first submit with firefox

    Johan BLEUZEN Newbie

      I'm having trouble with this component with Firefox...
      In fact I display the popup menu correctly, but when I select one value, the input field is correctly update, but it doesn't update my page....

      It's working greatly with IE and safari....

      Here is my code :


      <rich:suggestionbox for="suggest" minChars="3" immediate="true" focus="1" fetchValue="#{result.surname} #{result.firstname}" suggestionAction="#{SearchBean.autocomplete}" value="#{SearchBean.result}" var="result" ajaxSingle="true" selfRendered="false" >
       <h:column>
       <h:outputText value="#{result.surname}" />
       </h:column>
       <h:column>
       <h:outputText value="#{result.firstname}" />
       </h:column>
       <a4j:support event="onselect" action="#{SearchBean.actionSelect}" reRender="personview, resultview">
       <f:setPropertyActionListener value="#{result}" target="#{SearchBean.selectedPerson}" />
       </a4j:support>
       </rich:suggestionbox>
       </fieldset>
       </a4j:form>
      
      
       <a4j:outputPanel id="personview" ajaxRendered="true" >
       <div id="personinfo">
       <h:outputLabel rendered="#{(SearchBean.showInfo) and (not empty SearchBean.selectedPerson)}" for="person" value="Soutenances planifiées pour ">
       <h:outputText id="person" value="#{SearchBean.selectedPerson}" converter="PersonConverter"/>
       <h:outputText value=" :"/>
       </h:outputLabel>
       </div>
      
       <h:outputText id="error" rendered="#{not empty SearchBean.HTMLError}" value="#{SearchBean.HTMLError}"/>
      
       </a4j:outputPanel>
      
       <a4j:outputPanel id="resultview" ajaxRendered="true" >
       <h:dataTable id="trial" rendered="#{SearchBean.showInfo}" border="0" columnClasses="time,person" value="#{SearchBean.trialResult}" var="line">
       <h:column>
       <h:outputText value="Date : #{line.date}" /> <br />
       <h:outputText value="Heure : #{line.startTime}" />
       </h:column>
       <h:column>
       <h:outputText value="Apprenti : #{line.apprentice}" /> <br />
       <h:outputText value="Tuteur Enseignant : #{line.teacherTutor}" /> <br />
       <h:outputText value="Tuteur Ingénieur : #{line.engineerTutor}" /> <br />
       </h:column>
       </h:dataTable>
       </a4j:outputPanel>
       </a4j:region>


      and the functions in my bean :

      public List<PersonEntity> autocomplete(Object event) {
      
       String pattern = event.toString().toLowerCase();
       result.clear();
       selectedPerson = null;
       showInfo = false;
      
       for (PersonEntity pe : tmp) {
       if (pe.getFirstname().toLowerCase().contains(pattern)) {
       result.add(pe);
       continue;
       }
       if (pe.getSurname().toLowerCase().contains(pattern)) {
       result.add(pe);
       }
       }
       return result;
       }
      
       public String actionSelect() {
       if(prjd.isPlanningGenerated(paramsBean.getSelectedProject()) == false) {
       HTMLError = "Aucune soutenances planifiées pour le projet "+paramsBean.getSelectedProject().getProjectName();
       showInfo = false;
       return null;
       }
       HTMLError = null;
       showInfo = true;
       TrialDelegate td = new TrialDelegate();
       List<TrialEntity> trial = td.getAllTrials(paramsBean.getSelectedProject());
       trialResult.clear();
       for (TrialEntity trialEntity : trial) {
       if(trialEntity.getHtmlDescription().contains(selectedPerson.getSurname()) && trialEntity.getHtmlDescription().contains(selectedPerson.getFirstname())) {
       TrialInfoBean tib = TrialInfoBean.createTrialInfoBean(trialEntity);
       trialResult.add(tib);
       }
       }
       return null;
       }
      


      What am I mising ?
      Thanks a lot if you have any ideas....