pagination in datatable

UI Components for JSF
Post Reply
blakingFaces
Posts: 12
Joined: 30 May 2014, 09:46

14 Nov 2014, 15:41

hi!
I a problem for pagination in the datatable which contains p: columns!

I use primefaces 5.1 and apache tomcat 7

Code: Select all

<h:form id="data">
			
			<h:commandButton value="Fermer"
								action="#{tableBean.fermer()}">


								<f:ajax execute="@this" render="@this" immediate="true"></f:ajax>
							</h:commandButton>
			

			<p:dataTable var="values" value="#{tableBean.dynamicList3}"
				id="deTailTable" rowIndexVar="ligne" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="5,10,15,25,50">


				<p:columns value="#{tableBean.systemLists7}" var="column"
					columnIndexVar="colIndex">
					<f:facet name="header">
						<p:outputPanel>  
						
						
                  #{column}  
                </p:outputPanel>
					</f:facet>

					<h:outputText value="#{values.value[colIndex]}" />
					
				</p:columns>

				
					
				</p:column>

			</p:dataTable>

			

		</h:form>
Pagination is not working.
thank you for your help !

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

14 Nov 2014, 16:15

- your xhtml is invalid (</p:column>)
- javascript errors?
- server side errors?
- ajax errors?
- network errors?
...

blakingFaces
Posts: 12
Joined: 30 May 2014, 09:46

14 Nov 2014, 16:26

No it is not just specific errors but the pagination does not work with my datatable which contains the p: columns. I removed the </ p: column> but without success

Code: Select all

<h:form id="data">
			
			<h:commandButton value="Fermer"
								action="#{tableBean.fermer()}">


			<f:ajax execute="@this" render="@this" immediate="true"></f:ajax>
			</h:commandButton>
			

			<p:dataTable var="values" value="#{tableBean.dynamicList3}"
				id="deTailTable" rowIndexVar="ligne"  paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="5,10,15,25,50">


				<p:columns value="#{tableBean.systemLists7}" var="column"
					columnIndexVar="colIndex">
					<f:facet name="header">
						<p:outputPanel>  
						
						
                  #{column}  
                </p:outputPanel>
					</f:facet>

					<h:outputText value="#{values.value[colIndex]}" />
					
				</p:columns>

				

			</p:dataTable>

			
		</h:form>

kurtomerfaruk
Posts: 47
Joined: 16 Jul 2013, 21:28
Location: Gaziantep / Turkey
Contact:

16 Nov 2014, 19:56

As far as I can see missing the paginator="true"


organized as follows:

Code: Select all

<p:dataTable var="values" value="#{tableBean.dynamicList3}"
            id="deTailTable" rowIndexVar="ligne"  paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
            rowsPerPageTemplate="5,10,15,25,50" paginator="true">
PrimeFaces 11.0.0 Community, PrimeFaces 12.0.0
Jakarta EE 9
Glassfish 6.2.5

blakingFaces
Posts: 12
Joined: 30 May 2014, 09:46

17 Nov 2014, 10:45

thank you does it work

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 53 guests