Why DataTable pagination does not work!
There's something I'm doing esquercendo?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition template="../layouts/layoutPrincipal.xhtml"
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:rich="http://richfaces.ajax4jsf.org/rich"
xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:define name="cabecalho">
<link href="#{appResources.css}/cabecalho.css" rel="stylesheet" type="text.css"/>
<ui:include src="/cabecalhoex.xhtml"/>
</ui:define>
<ui:define name="topo"></ui:define>
<ui:define name="conteudo">
<h:head> </h:head>
<h:body style="padding-left: 5px">
<div style="text-align: left">
<h:form prependId="false">
<p:fieldset legend="MONTAGEM AVALIAÇÃO">
<h:panelGrid columns="2" width="100%" border="" cellpadding="0" cellspacing="0" style=" padding-left: 10px ; padding-top: 15px">
<h:outputLabel style="padding-left: 10px" styleClass="menuPreto" value="Informe o Período:"/>
<p:column>
<div style="padding-right: 340px; padding-top: 5px">
<p:inputText size="8" id="periodo" required="true" requiredMessage="Campo é obrigatório:" value="#{EventoQuestaoMB.eventoquestao.periodo}" immediate="true"/>
<h:message for="periodo" errorStyle="color:red"/>
</div>
</p:column>
<h:outputLabel style="padding-left:10px" styleClass="menuPreto" value="Escolha o evento:"/>
<p:column>
<div style="padding-top: 10px">
<h:selectOneListbox value="#{EventoQuestaoMB.eventoquestao.codevento}" size="1">
<f:selectItems value="#{EventoQuestaoMB.listaEventos}"/>
</h:selectOneListbox>
</div>
</p:column>
</h:panelGrid>
<br/>
<p:dataTable value="#{EventoQuestaoMB.listaQuestaoMontagem}" emptyMessage="Nenhum registro encontrado."
var="listaquestao" rows="10" paginator="true">
<f:facet name="header">
Questões Disponivel na Base de Dados!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
</f:facet>
<p:column selectionMode="multiple" />
<p:column headerText="Selecione as questões para montar o questionário">
<h:outputText value="#{listaquestao.nome}"/>
</p:column>
<f:facet name="footer">
<p:commandButton value="salva" action="#{EventoQuestaoMB.create}" ajax="false" immediate="true" />
<p:commandButton value="Cancelar" image="ui-icon ui-icon-cancel" />
</f:facet>
</p:dataTable>
</p:fieldset>
</h:form>
</div>
</h:body>
</ui:define>
<ui:define name="rodape">
<ui:include src="/rodape.xhtml"/>
</ui:define>
</ui:composition>