我正在尝试将tabview放在另一个tabview中但是我从tabview里面的ajax事件中得到错误这里是错误
javax.el.MethodNotFoundException:找不到方法:com.controlleurs.SelectBean@75c0452.onTabChange1(javax.faces.event.AjaxBehaviorEvent) at org.apache.el.util.ReflectionUtil.getMethod(ReflectionUtil.java:249) 在org.apache.el.parser.AstValue.invoke(AstValue.java:271) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:273) at org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processCustomListener(AjaxBehaviorListenerImpl.java:87) at org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processArgListener(AjaxBehaviorListenerImpl.java:72) at 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) at 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) at 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) at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:315) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source) 在java.lang.Thread.run(未知来源)
这是我的xhmtl代码
<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 please
答案 0 :(得分:0)
在你的豆子里他找不到方法..
方法的签名应为public void onTabChange(TabChangeEvent event)
这是你的方法签名的样子吗?
为什么你有双<p:ajax event="tabChange"
希望有帮助