0 Replies Latest reply on Mar 28, 2008 10:25 AM by Thiagu Mariappan

    How to improve the page load time

    Thiagu Mariappan Novice

      Hai every one

      i need to generate the dynamic page with dataTabl. I need to fetch the relevant data depends in the user subcategory selection. If the user click the s:link on my home page, I will get the subcategory id of that subcategory, Then I fetch the data found in subcategory, and then I display the data in the dataTable.

      This is my home page code

      s:link view="/TableList.xhtml" value=�cell phone� action="#{search.selectRequest}">
       <f:param name="subid" value="2"/>
      </s:link>
      

      This is my TableList.xhtml page code
      <h:form>
      <rich:dataTable value="#{productList}" var="Product">
      <f:facet name="header">
      <rich:columnGroup>
      <h:column>
      <h:outputText value="SubcategoryName" />
      </h:column>
      <h:column>
      <h:outputText value="Product Name" />
      </h:column>
      </f:facet>
      </rich:columnGroup>
      <h:column>
      <h:outputText value="#{Product.subcat}" />
      </h:column>
      <h:column>
      <h:outputText value="#{Product.name}" />
      </h:column>
      </rich:dataTable>
      </h:form>

      And my session bean code is
      @Stateful
      @Name("search")
      public class ProductsAction implements ProductsLocal,Serializable
      {
      @RequestParameter
      String subid;
      
      @Out(required=false)
      List<TblProducts> productList;
      
      @Begin(join=true)
      public String selectRequest() {
      productList =em.createQuery("select t from TblProducts t where t.subcat="+ subid).getResultList();
      
      }
      }

      i need to improve TableList.xhtml page load time Please any help, How to do that?
      I fond the delay for fetch the all data from DB found in any particular subcategory. Is there any way to prevent the query execution often?
      I try with the page fragment cache, its working but still I got the same load time because of query execution. I conform the page fragment is working, after change the data in my DB its not reflected in my TableList.xhtml page because of that data’s are from my cache.
      it is it possible to prevent the frequent query execution by Jboss cache. Is it possible to improve the dynamic page load time by using Jboss cache.

      by
      Thiagu.m