IllegalArgumentException:数据网格 primefaces 中不支持的每页行数

IllegalArgumentException: Unsupported rows per page value, in datagrid primefaces

早上好,我是 jsf 的新手,我想将属于由视图参数传递的 Marca(品牌)的产品放入数据网格,这是一些 jsf 代码

<f:view>

    <f:metadata>
         <f:param name="id"  value="#{marcaController.id}" scope="request"></f:param>
    </f:metadata>
</f:view>

    <ui:composition template="template/template1.xhtml">
    <ui:define name="content1">
      <div class="product card">
       <h:form id="form" >
       
        <p:messages id="messages"/>
            <p:dataGrid var="product" value="#{prodottoController.finbyMarca(marcaController.id)}"  columns="3" layout="grid"
                    rows="22" paginator="true" id="cars"
                    paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                    rowsPerPageTemplate="6,12,16" >
            <div class="product-grid-item card" style="margin-bottom: 0">
                <div class="product-grid-item-top">
                    <div>
                        <i class="pi pi-tag product-category-icon"/>    
                    </div>  
                </div>
                <div class="product-grid-item-content">
                    <h:graphicImage value="#{product.immagine}" style="width:240px;height:260px" />
                    <div class="product-name">#{product.nome}</div>
                    <div class="product-description">#{product.descrizione}</div> 
                </div>
                <div class="product-grid-item-bottom">
                <h:outputText value="#{product.prezzo}" styleClass="product-priceline" style="text-decoration:line-through;margin-left:20px;">
                        <f:convertNumber currencySymbol="€" type="currency"/>
                    </h:outputText>
                    <h:outputText value="#{product.prezzoscontato}" styleClass="product-price" style="color:red;font-size:22px;margin-left:20px;">
                        <f:convertNumber currencySymbol="€" type="currency"/>
                    </h:outputText>
                    <br></br>
                   
                   
                </div>
            </div>
          
        </p:dataGrid>
         
      </h:form>
    
 </div>
    </ui:define>
    </ui:composition>
</html>

这是马卡报控制器

@Named
@ViewScoped
public class MarcaController implements Serializable {
    private static final long serialVersionUID = 1L;
    String id;
    Marca m=new Marca();
    @EJB
    private MarcaDao marcaDao;

    @PostConstruct
    public void initialize() {
        id = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id");
    }
    
    public Marca getSelected() {
        return m;
        
    }
    public void seteSelected(Marca m) {
        this.m=m;
    }
    
    public List<Marca> listAll() {
        return marcaDao.listAll();
    }
    
public String getId(){  
        return idm;
    }
public void setId(String i){
    id=i;   
}
    
    public Marca findbyId(String s){
        
        Integer id=Integer.parseInt(s);
        
        m=marcaDao.findById(id);
        return m;
    }   
}


Prodotto 控制器

@SessionScoped
@Named
public class ProdottoController implements Serializable {

    private static final long serialVersionUID = 1L;
    private Prodotto selected=new Prodotto();
    private Integer idTipologia;
    private Integer idCategoria;
    private Integer idSottocategoria;
    @EJB
    private ProdottoDao ejbProdotto;
    @EJB
    private TipologiaDao ejbTipologia;
    
    
    @EJB
    private SottocategoriaDao ejbSottocategoria;
    @EJB
    private CategoriaDao ejbCategoria;
    
    public Integer getIdTipologia() {
        return idTipologia;
    }



    public void setIdTipologia(Integer idTipologia) {
        this.idTipologia = idTipologia;
    }



    public Integer getIdSottocategoria() {
        return idSottocategoria;
    }



    public void setIdSottocategoria(Integer idSottocategoria) {
        this.idSottocategoria = idSottocategoria;
    }



    public Integer getIdCategoria() {
        return idCategoria;
    }
    public void setIdCategoria(Integer idCategoria) {
        this.idCategoria = idCategoria;
    }
    public List<Prodotto> listaProdotti(){
        return ejbProdotto.listAll();
    }
    
    public List<Prodotto> finbyMarca(Integer idMarca){
        
        return ejbProdotto.findByMarca(idMarca);
    }
}

它只显示第一页,当我点击另一个编号的页面时,服务器运行这个异常


11:15:16,838 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-6) Error Rendering View[/marca.xhtml]: java.lang.IllegalArgumentException: Unsupported rows per page value: 22
    at deployment.esem.war//org.primefaces.component.api.UIPageableData.updatePaginationData(UIPageableData.java:330)
    at deployment.esem.war//org.primefaces.component.datagrid.DataGridRenderer.encodeEnd(DataGridRenderer.java:51)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:595)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.encodeAll(UIComponent.java:1654)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:615)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:159)
    at deployment.esem.war//org.primefaces.component.api.UIData.visitTree(UIData.java:691)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.visitTree(UIComponent.java:1468)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIForm.visitTree(UIForm.java:355)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.visitTree(UIComponent.java:1468)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.visitTree(UIComponent.java:1468)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:400)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:319)
    at deployment.esem.war//org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:65)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1102)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.encodeAll(UIComponent.java:1647)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:442)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:170)
    at javax.faces.api@3.0.0.SP02//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
    at javax.faces.api@3.0.0.SP02//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:102)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:199)
    at javax.faces.api@3.0.0.SP02//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:708)
    at javax.faces.api@3.0.0.SP02//javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
    at io.opentracing.contrib.opentracing-jaxrs2//io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:52)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletChain.handleRequest(ServletChain.java:68)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.access0(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.call(ServletInitialHandler.java:133)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.call(ServletInitialHandler.java:130)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction.call(ServletRequestContextThreadSetupAction.java:48)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction.call(ContextClassLoaderSetupAction.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create[=13=](SecurityContextThreadSetupAction.java:105)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.access[=13=]0(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:99)
    at io.undertow.core@2.1.0.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:370)
    at io.undertow.core@2.1.0.Final//io.undertow.server.HttpServerExchange.run(HttpServerExchange.java:830)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:834)

11:15:16,842 SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (default task-6) java.lang.IllegalArgumentException: Unsupported rows per page value: 22
    at deployment.esem.war//org.primefaces.component.api.UIPageableData.updatePaginationData(UIPageableData.java:330)
    at deployment.esem.war//org.primefaces.component.datagrid.DataGridRenderer.encodeEnd(DataGridRenderer.java:51)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:595)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.encodeAll(UIComponent.java:1654)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:615)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:159)
    at deployment.esem.war//org.primefaces.component.api.UIData.visitTree(UIData.java:691)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.visitTree(UIComponent.java:1468)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIForm.visitTree(UIForm.java:355)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.visitTree(UIComponent.java:1468)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.visitTree(UIComponent.java:1468)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:400)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:319)
    at deployment.esem.war//org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:65)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1102)
    at javax.faces.api@3.0.0.SP02//javax.faces.component.UIComponent.encodeAll(UIComponent.java:1647)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:442)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:170)
    at javax.faces.api@3.0.0.SP02//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
    at javax.faces.api@3.0.0.SP02//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:102)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76)
    at com.sun.jsf-impl@2.3.9.SP08//com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:199)
    at javax.faces.api@3.0.0.SP02//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:708)
    at javax.faces.api@3.0.0.SP02//javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
    at io.opentracing.contrib.opentracing-jaxrs2//io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:52)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletChain.handleRequest(ServletChain.java:68)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
    at io.undertow.core@2.1.0.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
    at io.undertow.core@2.1.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.access0(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.call(ServletInitialHandler.java:133)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.call(ServletInitialHandler.java:130)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction.call(ServletRequestContextThreadSetupAction.java:48)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction.call(ContextClassLoaderSetupAction.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create[=13=](SecurityContextThreadSetupAction.java:105)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create[=13=](UndertowDeploymentInfoService.java:1541)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.access[=13=]0(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:99)
    at io.undertow.core@2.1.0.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:370)
    at io.undertow.core@2.1.0.Final//io.undertow.server.HttpServerExchange.run(HttpServerExchange.java:830)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:834)

好像在每次更改页面时都丢失了参数 我不知道为什么,这个错误 运行 是否可能是因为我正在尝试使用带有 post 和 viewScoped 的 get? 谢谢!

如果您使用的是 rowsPerPageTemplate="6,12,16",那么 rows="22" 确实无效,因为 22 不是 rowsPerPageTemplate 值之一。更改任一属性以使值匹配。

查看源代码:https://github.com/primefaces/primefaces/blob/befd1b15302e46d641e4b997010c5175757c5da5/src/main/java/org/primefaces/component/api/UIPageableData.java#L290-L310

private boolean isRowsPerPageValid(String rowsParam) {

    if (rowsParam == null) {
        return true;
    }

    String rowsPerPageTemplate = getRowsPerPageTemplate();

    if (rowsPerPageTemplate != null) {
        String[] options = rowsPerPageTemplate.split("[,]+");

        for (String option : options) {
            String opt = option.trim();

            if (opt.equals(rowsParam) || (opt.startsWith("{ShowAll|") && "*".equals(rowsParam))) {
                return true;
            }
        }

        return false;
    }

    int rows = getRows();

    if (rows > 0) {
        return Integer.toString(rows).equals(rowsParam);
    }

    return true;
}