1 Reply Latest reply on Jul 10, 2007 2:04 PM by Sergey Smirnov

    Perfomance issues with reRendering of Dropdowns ???

    Bansilal Haudakari Newbie

      Wondering how reRender of dropdowns works ??? especially if it has 10,000 values in it


      Will it iterate thru each & every value in the dropdown and then reRender the dropdown to expected value. This is exactly whats happening in my case


      For the first time when the form loads, the dropdowns are populated from database . This is happyPath :)-
      When user starts interacting with the form i.e. key in data into textfield and tabs out , as expected other fields on the form have their values set based on input data in textbox thru database query. BUT if one of this fields happens to be dropdown then latency occurs as it getting "reRendered" (as told in a4j onblur event) i.e. tries to set the value based on input data in textbox.

      But this reRendering is happening in a round-about way i.e.
      it iterates thru each & every element in the list like while loop and then sets the correct value in the dropdown.
      Other dropdowns too have similar behaviour . Please note in backing bean i am populating the dropdown only if its null . For example
      public List getBuildingList(){
       logger.info(" *** In getBuildingList() Backing Bean size= ");
      
       if(buildingSelectItems == null )
       this.buildingSelectItems = doGetBuildingList();
       return buildingSelectItems;
       }
      
      public List doGetBuildingList() {
       logger.info(" *** In doGetBuildingList() Backing Bean");
      }
      

      <h:inputText id="propertyTag" value="#{deviceBean.tagNumber}" >
       <a4j:support action="#{deviceBean.loadAssetDetails}" event="onblur" reRender="manuf,model,serialNo,building,floor,colBay,location" />
       </h:inputText>
      
      <h:selectOneMenu id="building" value="#{deviceBean.selectedBuilding}" >
       <f:selectItem itemLabel="" itemValue="" />
       <f:selectItems value="#{deviceBean.buildingList}" />
      
       </h:selectOneMenu>