Ajax problem with primefaces 10

UI Components for JSF
Post Reply
mjordanav
Posts: 11
Joined: 07 Jul 2021, 13:59

02 Aug 2021, 15:47

Hi!

I am updating primfeaces v.5.3 to v.10.0. I already have updated to version 10.0 but I have found a problem with one ajax sentence:

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
				xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
				xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                template="/WEB-INF/templates/genericOperations.xhtml">
                	
		<ui:define name="radio">
		<h:form>
			<br/>
			<h:panelGroup layout="block" rendered="#{genericOperation.searchCAA and genericOperation.searchBO5}">
				<h:selectOneRadio value="#{genericOperation.operation}" class="radioButton">
			        <f:selectItem itemLabel="#{msg['Operaciones-CAA']}" itemValue="0" />
			        <f:selectItem itemLabel="#{msg['Operaciones-BO5']}" itemValue="1" />
			        <p:ajax update="panelGroupGenericOperations"/>
			    </h:selectOneRadio>		
			</h:panelGroup>
			</h:form>
		</ui:define>
		<ui:define name="operations">
			 <h:panelGroup layout="block" id="panelGroupGenericOperations">
				
				<h:panelGroup layout="block" rendered="#{genericOperation.operation == 0}">	
					<ui:include src="../../caa/qry/operations.xhtml" />
				</h:panelGroup>
				
				<h:panelGroup layout="block" rendered="#{genericOperation.operation == 1}">		
					<ui:include src="../../gas/qry/operations.xhtml" />
				</h:panelGroup>
					
			</h:panelGroup>
		</ui:define>
</ui:composition>
This code worked with version 5.3 but now is not updating the panelGroup with the id="panelGroupGenericOperations".

I have seen the migration guide https://primefaces.github.io/primefaces ... ationguide but I can't see any reference to ajax inside a h:panelGroup or h:selectItem

Anybody knows how can I resolve the problem? Or why is happening?

Thank you in advance

pangbuddy
Posts: 13
Joined: 01 Apr 2011, 23:27

06 Aug 2021, 14:21

Try to add event, it works to me.

Code: Select all

<p:ajax event="change" update="panelGroupGenericOperations"/>

mjordanav
Posts: 11
Joined: 07 Jul 2021, 13:59

06 Aug 2021, 15:20

It is still not working the console shows his error:

2021-08-06 15:19:06 ERROR context:222 - java.lang.ArrayIndexOutOfBoundsException: 24
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1399)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1420)
at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:875)
at com.sun.faces.application.view.JspStateManagementStrategy.restoreView(JspStateManagementStrategy.java:273)
at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:138)
at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:591)
at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:151)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:353)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:353)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:353)
at org.omnifaces.viewhandler.RestorableViewHandler.restoreView(RestorableViewHandler.java:86)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at net.alvic.auth.CredentialsCatchFilter.doFilter(CredentialsCatchFilter.java:31)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

06 Aug 2021, 19:22

Your latest issue is a Mojarra bug not a PrimeFaces bug see: https://github.com/eclipse-ee4j/mojarra/issues/4936
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests