I have this weird problem with a paginated dataTable using the latest version from sources, when using the pagination the dataTable just breaks, it is better explained by the images and code:
The View
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
<h:head>
<title>test</title>
</h:head>
<h:body>
<h:form>
<p:dataTable var="obj" value="#{testBean.strList}" rows="10" paginator="true" paginatorPosition="bottom">
<p:column headerText="Column 1">
<h:outputText value="#{obj}" />
</p:column>
<p:column headerText="Column 2">
<h:outputText value="#{obj}" />
</p:column>
<p:column headerText="Column 3">
<h:outputText value="#{obj}" />
</p:column>
<p:column headerText="Column 4">
<h:outputText value="#{obj}" />
</p:column>
</p:dataTable>
</h:form>
</h:body>
</html>
Code: Select all
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
@Named
@ViewScoped
public class TestBean {
private List<String> strList;
@PostConstruct
public void doInitListOfString(){
setStrList(new ArrayList<String>());
for (int i=1; i<30; i++){
getStrList().add("TEST " + i);
}
}
public List<String> getStrList() {
return strList;
}
public void setStrList(List<String> strList) {
this.strList = strList;
}
}
Page 1
Paginated to Page 2
Am i missing some configuration about datatable reflow, responsive or anything? a have a previous version from sources too (can not remember the revision) and does not have this behavior.
Thanks in advance for any help.