Note that there are some explanatory texts on larger screens.

plurals
  1. POJSF scrollable table with huge data
    primarykey
    data
    text
    <p><strong>Edited</strong></p> <p>I want to display a scrollable table with 40 columns and 1000 rows.</p> <p>I used <code>rich:extendedDataTable</code> (I'm using richfaces 4) with <code>clientRows="20"</code>, but I get a table with 20 rows and when I scroll, just this rows are updated and I didn't get new rows!</p> <p><img src="https://i.stack.imgur.com/U1pT5.png" alt="enter image description here"></p> <p>xHTML</p> <pre><code> &lt;rich:extendedDataTable id="idList" value="#{declarationReglementaireModel.detailCurrentDecReg.decReg.listLigneTa3SDTO}" var="ligneTA3" frozenColumns="2" style="height:300px; width:800px;" selectionMode="none" clientRows="15"&gt; &lt;rich:column width="35px"&gt; &lt;h:panelGrid columns="1" cellpadding="2"&gt; &lt;h:commandLink action="#{rechercheDecRgltCtrl.afficherDetail}" class="lien_detail"&gt; &lt;span class="icone icone-edit icone-align-center" /&gt; &lt;f:setPropertyActionListener target="#{declarationReglementaireModel.detailCurrentDecReg.decReg.listLigneTa3SDTO}" value="#{ligneTA3}" /&gt; &lt;/h:commandLink&gt; &lt;/h:panelGrid&gt; &lt;/rich:column&gt; &lt;rich:column width="150px" sortBy="#{ligneTA3.idTitre}" sortOrder="ascending"&gt; &lt;f:facet name="header"&gt;Référence Titre&lt;/f:facet&gt; &lt;h:outputText value="#{ligneTA3.idTitre}"&gt; &lt;/h:outputText&gt; &lt;/rich:column&gt; &lt;rich:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="a" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{ligneTA3.vlColA}"&gt; &lt;/h:outputText&gt; &lt;/rich:column&gt; ... &lt;/rich:extendedDataTable&gt; </code></pre> <p>Model DeclarationReglementaireModel </p> <pre><code>@ManagedBean(name="declarationReglementaireModel") @SessionScoped public class DeclarationReglementaireModel implements Serializable { private static final long serialVersionUID = 1L; private long test ; private LigneDecRegSortieDTO currentDecReg ; private List&lt;LigneDecRegSortieDTO&gt; listDecReg ; private DetailDecRegModel detailCurrentDecReg ; private Integer selectedPage; public LigneDecRegSortieDTO getCurrentDecReg() { return currentDecReg; } public void setCurrentDecReg(LigneDecRegSortieDTO currentDecReg) { this.currentDecReg = currentDecReg; } public List&lt;LigneDecRegSortieDTO&gt; getListDecReg() { if(this.listDecReg == null){ this.listDecReg = new ArrayList&lt;LigneDecRegSortieDTO&gt;() ; } return listDecReg; } public void setListDecReg(List&lt;LigneDecRegSortieDTO&gt; listDecReg) { this.listDecReg = listDecReg; } public long getTest() { return test; } public DetailDecRegModel getDetailCurrentDecReg() { return detailCurrentDecReg; } public void setDetailCurrentDecReg(DetailDecRegModel detailCurrentDecReg) { this.detailCurrentDecReg = detailCurrentDecReg; } public void setTest(long test) { this.test = test; } public void init(){ listDecReg = null ; currentDecReg = null ; detailCurrentDecReg = null ; this.selectedPage = null ; } public Integer getSelectedPage() { if (this.selectedPage == null) this.selectedPage = 1; return this.selectedPage; } public void setselectedPage(Integer numPage) { this.selectedPage = numPage; } } </code></pre> <p>Model DetailDecRegModel</p> <pre><code>public class DetailDecRegModel implements Serializable { private static final long serialVersionUID = 1L; private DecRegDTO decReg ; private TypeDecRegDTO typeDecReg ; private int nbreLignes ; public static final int DIR_IRREG = 1 ; public static final int GLD_CLA = 2 ; public static final int GLD_PERIODE = 3 ; public static final int TAB_A3 = 4 ; public static final int TAB_A3_BIS = 5 ; public static final int DIR_AUTRES = 6 ; public DetailDecRegModel() { super(); } public DetailDecRegModel(DecRegDTO detailCurrentDecReg, TypeDecRegDTO typeDecReg) { super(); this.decReg = detailCurrentDecReg; this.typeDecReg = typeDecReg; } public DecRegDTO getDecReg() { return decReg; } public void setDecReg(DecRegDTO decReg) { this.decReg = decReg; } public TypeDecRegDTO getTypeDecReg() { return typeDecReg; } public void setTypeDecReg(TypeDecRegDTO typeDecReg) { this.typeDecReg = typeDecReg; } public int getNbreLignes() { switch ((int)getTypeDecReg().getIdTypeDecReg()){ case DIR_IRREG: this.nbreLignes = decReg.getListLigneDipRecsDTO().size() ; break; case GLD_CLA: this.nbreLignes = decReg.getListLigneGldsDTO().size() ; break; case GLD_PERIODE: this.nbreLignes = decReg.getListLigneGldsDTO().size() ; break; case TAB_A3: this.nbreLignes = decReg.getListLigneTa3SDTO().size(); break; case TAB_A3_BIS: this.nbreLignes = decReg.getListLigneTa3SDTO().size(); break; case DIR_AUTRES: this.nbreLignes = decReg.getListLigneDipRecsDTO().size() ; break; } return nbreLignes; } public void setNbreLignes(int nbreLignes) { this.nbreLignes = nbreLignes; } //public boolean isDecRegTypeDipRec(){ public boolean isDecRegTypeDirIrreg(){ return typeDecReg != null &amp;&amp; (int)typeDecReg.getIdTypeDecReg() == DIR_IRREG ; } public boolean isDecRegTypeDirAutres(){ return typeDecReg != null &amp;&amp; (int)typeDecReg.getIdTypeDecReg() == DIR_AUTRES ; } public boolean isDecRegTypeGldPer(){ return typeDecReg != null &amp;&amp; (int)typeDecReg.getIdTypeDecReg() == GLD_PERIODE ; } public boolean isDecRegTypeGldCla(){ return typeDecReg != null &amp;&amp; (int)typeDecReg.getIdTypeDecReg() == GLD_CLA ; } public boolean isDecRegTypeTabA3(){ return typeDecReg != null &amp;&amp; (int)typeDecReg.getIdTypeDecReg() == TAB_A3 ; } public boolean isDecRegTypeTabA3Bis(){ return typeDecReg != null &amp;&amp; (int)typeDecReg.getIdTypeDecReg() == TAB_A3_BIS ; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload