javajsfprimefacesdatagridviewparams

IllegalArgumentException: Unsupported rows per page value, in datagrid primefaces


Good Morning,Im new in jsf,Im tring to put into the datagrid the product that belong to a Marca(Brand) passed by a viewparam this is some jsf code

<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>

this is Marca Controller

@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 Controller

@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);
    }
}

It Show only the first page, when i click to another numbered page,server run this exception


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$1.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.access$100(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(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$000(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.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$1.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$1.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.access$100(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1541)
    at org.wildfly.extension.undertow@19.1.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(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$000(ServletInitialHandler.java:78)
    at io.undertow.servlet@2.1.0.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.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$1.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)

it's like it loose the param on every page changing I don't know why,is it possible that this error run because i'm trying to use a get whith a post and viewScoped? Thank you!


Solution

  • If you are using rowsPerPageTemplate="6,12,16", then rows="22" is indeed invalid as 22 is not one of the rowsPerPageTemplate values. Change either attribute so the values match.

    See source code: 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;
    }