我试图将tabview放入另一个tabview中但是我在tabview内部的ajax事件中得到错误这里是错误
javax.el。Method notfoundexception: Method not found: com.controlleurs.SelectBean@75c0452.onTabChange1(java .faces.event. ajaxbehaviorevent)org.apache.el.util.ReflectionUtil.getMethod (ReflectionUtil.java: 249)org.apache.el.parser.AstValue.invoke (AstValue.java: 271)org.apache.el.MethodExpressionImpl.invoke (MethodExpressionImpl.java: 273)org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processCustomListener (AjaxBehaviorListenerImpl.java: 87)org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processArgListener (AjaxBehaviorListenerImpl.java: 72)org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processAjaxBehavior (AjaxBehaviorListenerImpl.java: 56)javax.faces.event.AjaxBehaviorEvent.processListener (AjaxBehaviorEvent.java: 113)javax.faces.component.behavior.BehaviorBase.broadcast (BehaviorBase.java: 106)javax.faces.component.UIComponentBase.broadcast (UIComponentBase.java: 804)javax.faces.component.UIData.broadcast (UIData.java: 1086)javax.faces.component.UIData.broadcast (UIData.java: 1108)javax.faces.component.UIData.broadcast (UIData.java: 1108)javax.faces.component.UIData.broadcast (UIData.java: 1108)javax.faces.component.UIViewRoot.broadcastEvents (UIViewRoot.java: 790)javax.faces.component.UIViewRoot.processApplication (UIViewRoot.java: 1282)com.sun.faces.lifecycle.InvokeApplicationPhase.execute (InvokeApplicationPhase.java: 81)com.sun.faces.lifecycle.Phase.doPhase (Phase.java: 101)com.sun.faces.lifecycle.LifecycleImpl.execute (LifecycleImpl.java: 198)javax.faces.webapp.FacesServlet.service (FacesServlet.java: 646)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 303)org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 208)org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java: 52)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 241)org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 208)org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java: 220)org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java: 122)org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java: 501)org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java: 170)org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java: 98)org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java: 950)org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java: 116)org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java: 408)org.apache.coyote.http11.AbstractHttp11Processor.process (AbstractHttp11Processor.java: 1040)org.apache.coyote.AbstractProtocol AbstractConnectionHandler.process美元(AbstractProtocol.java: 607)org.apache.tomcat.util.net.JIoEndpoint SocketProcessor.run美元(JIoEndpoint.java: 315)在java.util.concurrent.ThreadPoolExecutor.runWorker(来源未知)在java.util.concurrent.ThreadPoolExecutor$Worker.run(来源未知)在java.lang.Thread.run(未知来源)
这是我的xhtml代码
<h:form id="form">
<p:tabView id="my" >
<p:tab id="tabview" title="Ressources Humaines">
<p:tabView activeIndex="#{SelectBean.activeTab}" value="#{SelectBean.types}" var="item" >
<p:ajax event="tabChange" listener="#{SelectBean.onTabChange}" update=":form" />
<p:tab title="#{item}">
<p:tabView id="tab" activeIndex="#{SelectBean.other}" value="#{SelectBean.res}" var="rr">
<p:ajax event="tabChange" listener="#{SelectBean.onTabChange1}" />
<p:tab title="#{rr.nom_ressource}">
<h:panelGrid>
<h:graphicImage value="Ressources/images/emp.jpg" style="vertical-align:middle" />
<span style="font-size:15px; width:170px; display:inline-block;"> Nom : #{rr.nom_ressource} Type: #{rr.type_ressource} Specification: #{rr.experience} </span>
<h:commandButton image="Ressources/images/delete.jpg" actionListener="#{SelectBean.act}" update=":form" style="vertical-align:middle" >
Supprimer
</h:commandButton>
<h:commandButton image="Ressources/images/update.png" style="vertical-align:middle" >
Modifier
</h:commandButton>
</h:panelGrid>
</p:tab>
</p:tabView>
</p:tab>
</p:tabView>
</p:tab>
<p:tab title="Ressources Materielle">
</p:tab>
</p:tabView>
</h:form>
anyhelp请
在你的bean中,他找不到方法。
方法的签名应该是public void onTabChange(TabChangeEvent event)
这是你的方法签名看起来像什么?
为什么你有两个<p:ajax event="tabChange"
希望对您有所帮助