1 Reply Latest reply on Mar 28, 2008 1:26 PM by Pete Muir

    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"/>  

      This is my TableList.xhtml page code

      <rich:dataTable value="#{productList}" var="Product">
      <f:facet name="header">
      <h:outputText value="SubcategoryName" />
      <h:outputText value="Product Name" />
      <h:outputText value="#{Product.subcat}" />
      <h:outputText value="#{Product.name}" />

      And my session bean code is

      public class ProductsAction  implements ProductsLocal,Serializable
      String subid;
      List<TblProducts> productList;
      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 tome 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.
      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.

      i try with setHint(org.hibernate.cacheRegion, true) to query , but it also not working