1

My dataTable code

<p:dataTable  border="1" binding="#{fBean.table}" rowClasses="evenRows,oddRows" id="dt" rules="all"
             headerClass="standardTableHeader" styleClass="table" value="#{fBean.list}" var="s">
       <p:column>
          <f:facet name="header">
             <h:outputText value="Name"/>
          </f:facet>
          <h:outputText value="#{s.groupName}" />
       </p:column>

       <p:column>
         <f:facet name="header">
           <h:outputText value="Status"/>
         </f:facet>
         <h:outputText value="#{s.status}" />
       </p:column>
    </p:dataTable>

In my bean i have code for fetchdata from server getList().This method calling multiple times due to calling multiple time send request server multiple times.

Jasper de Vries
  • 16,868
  • 6
  • 60
  • 93
manu
  • 71
  • 6
  • Don't fetch it in the getter. Instead cache the list when the bean is initialized or use a lazy model. See also https://stackoverflow.com/questions/2090033/why-jsf-calls-getters-multiple-times – Jasper de Vries Sep 21 '21 at 07:39
  • @JasperdeVries thanx that used me maybe I could not found the exact reason. – manu Sep 22 '21 at 06:43

0 Answers0