1 Reply Latest reply on Nov 13, 2012 6:24 AM by atmohsin

    a4j:repeat - is getting hanged after adding more rows say more than 50

    atmohsin

      Hi

       

      I am facing below issue

       

      We are using a4j:repeat for adding dynamic rows. For first 10 to 20 rows it is very fast once it is reaches 40 rows the performace get degrate and after 50 it is getting hanged. Ajax loading message wont go, still it is saying loading.

       

      The code is

       

      <a4j:repeat

                                          value="#{goodsReceivedDetailForm.goodsReceived.goodsReceivedDetails}"

                                          var="grnDetails" id="grnDetailsRepeatId" rowKeyVar="rowIndex">

       

                                             <td align="center"><a4j:commandButton value="+"

                                                      action="#{goodsReceivedDetailForm.addGrnDetails}"

                                                      reRender="grnList" immediate="true"

                                                      rendered="#{goodsReceivedDetailForm.mode=='A'}">

                                                  </a4j:commandButton></td>

                                              <td align="center"><a4j:commandButton value="-"

                                                      action="#{goodsReceivedDetailForm.deleteGrnDetails}"

                                                      reRender="grnList, grandTotal,finalBasicCost,finalTaxCost,finalTotalCost"

                                                      immediate="true"

                                                      rendered="#{(goodsReceivedDetailForm.mode=='A') &amp;&amp;(!grnDetails.isMaterialConsumed)}">

                                                      <f:setPropertyActionListener

                                                          target="#{goodsReceivedDetailForm.selectedGoodsReceivedDetail}"

                                                          value="#{grnDetails}" />

                                                  </a4j:commandButton></td>

      </a4j:repeat>

       

      Bean code is

       

      public void addGrnDetails() {

              GoodsReceivedDetail grnDetailsObj = new GoodsReceivedDetail();

       

              grnDetailsObj.setRate(new BigDecimal(0));

              grnDetailsObj.setPurchaseQuantity(new BigDecimal(0));

              grnDetailsObj.setStockQuantity(new BigDecimal(0));

              grnDetailsObj.setBasicCost(new BigDecimal(0));

              grnDetailsObj.setTaxCost(new BigDecimal(0));

              grnDetailsObj.setTotalCost(new BigDecimal(0));

              grnDetailsObj.setSavedPurchaseQuantity(new BigDecimal(0));

              grnDetailsObj.setModifiedById(loggedUserId);

              grnDetailsObj.setGoodsReceived(this.goodsReceived);

              this.goodsReceived.getGoodsReceivedDetails().add(grnDetailsObj);

          }

       

       

      Please let me know how to solve this issue. is there any restriction to adding the rows. I am using Richface 3.3 Final Release.

       

       

      Thanks

      Mohsin