0 Replies Latest reply on Jul 6, 2007 3:08 PM by Bansilal Haudakari

    Ajax4JSF : Re-rendering Dropdown value from onblur event hit

    Bansilal Haudakari Newbie

      I am using a4j:onblur event on textfield to reRender other fields on the form which include 3 dropdowns and 3 textfields

      The moment i hit tab key a4j:onblur event works as expected & reRenders other fields on the form. But their is great latency during reRendering and what i have observed is it iterates thru each & every element in the dropdown as seen on the page

      In the onblur event method ( i.e. loadAssetDetails in my case) , i am setting the value in dropdown like this.selectedIndex = value retrieved from database.
      Here is the code snippet
      In JSF Page

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

      In Backing Bean
      public String loadAssetDetails() {
       this.mfgrId = Long.toString(manuf.getId()); //manuf object is retrieved from database. "mfgrId" to set the value in dropdown but it sets the value only after scanning thru all the elements in dropdown as see in the page. The samething happens for other dropdowns
       this.selectedBuilding = namsAsset.getBuilding();
       this.selectedFloor = namsAsset.getFloor();
       return null;

      Any pointers/suggestions will be highly appreciated