1 Reply Latest reply on Apr 29, 2008 2:07 PM by Luc Feys

    Actions excecuted twice with s:button

    Luc Feys Newbie

      Hello,


      I am experiencing some weird behaviour in seam (1.2.1).


      If I use an s:button my actions are executed twice, if I use a h:commandButton, they are executed only once (as expected). For some actions this is not a problem, but for others is absolutely undesirable.
      The problem is that I can't use h:commandButton, because then I get errors with a custom facelets function (ClassNotFoundException when submitting. See my previous post). 


      Does anyone have an idea what might be causing my actions to be executed twice, or how I could check what is going on (by debugging a specific seam class perhaps)?


      Thanks.


      Luc

        • 1. Re: Actions excecuted twice with s:button
          Luc Feys Newbie

          Hello,


          I have been trying to dig a little deeper into this problem, but can't find out what is going wrong.
          If I press for example the 'Search' button, the 'searchAction.searchByName' action is supposed to be called 'once'. But it's invoked twice. So I've checked the stacktraces on both calls and they are identical (see below).


          Any suggestions on this problem are welcome.


          Thanks,


          Luc


          SearchAction.searchByName() line: 55     
          NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]     
          NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39     
          DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25     
          Method.invoke(Object, Object...) line: 585     
          Reflections.invoke(Method, Object, Object...) line: 20     
          RootInvocationContext.proceed() line: 31     
          EE5SeamInvocationContext(SeamInvocationContext).proceed() line: 57     
          RollbackInterceptor.aroundInvoke(InvocationContext) line: 34     
          EE5SeamInvocationContext(SeamInvocationContext).proceed() line: 69     
          BijectionInterceptor.aroundInvoke(InvocationContext) line: 47     
          EE5SeamInvocationContext(SeamInvocationContext).proceed() line: 69     
          MethodContextInterceptor.aroundInvoke(InvocationContext) line: 27     
          EE5SeamInvocationContext(SeamInvocationContext).proceed() line: 69     
          SynchronizationInterceptor.aroundInvoke(InvocationContext) line: 31     
          EE5SeamInvocationContext(SeamInvocationContext).proceed() line: 69     
          JavaBeanInterceptor(RootInterceptor).invoke(InvocationContext, EventType) line: 103     
          JavaBeanInterceptor.interceptInvocation(Method, Object[]) line: 151     
          JavaBeanInterceptor.invoke(Object, Method, Method, Object[]) line: 87     
          SearchAction_$$_javassist_104.searchByName() line: not available     
          NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]     
          NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39     
          DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25     
          Method.invoke(Object, Object...) line: 585     
          MethodBindingImpl.invoke(FacesContext, Object[]) line: 129     
          ActionParamBindingHelper.invokeTheExpression(FacesContext) line: 58     
          ActionParamMethodBinding.invoke(FacesContext, Object[]) line: 75     
          Expressions$2.invoke(Object...) line: 148     
          Pages.callAction(FacesContext) line: 499     
          Pages.enterPage(FacesContext) line: 282     
          SeamPhaseListener(AbstractSeamPhaseListener).enterPage(PhaseEvent) line: 276     
          SeamPhaseListener(AbstractSeamPhaseListener).beforeRender(PhaseEvent) line: 214     
          SeamPhaseListener.beforePhase(PhaseEvent) line: 56     
          PhaseListenerManager.informPhaseListenersBefore(PhaseId) line: 70     
          LifecycleImpl.render(FacesContext) line: 373     
          FacesServlet.service(ServletRequest, ServletResponse) line: 138     
          ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252     
          ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173     
          SeamFilter$FilterChainImpl.doFilter(ServletRequest, ServletResponse) line: 63     
          HotDeployFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 60     
          SeamFilter$FilterChainImpl.doFilter(ServletRequest, ServletResponse) line: 49     
          RedirectFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 45     
          SeamFilter$FilterChainImpl.doFilter(ServletRequest, ServletResponse) line: 49     
          ExceptionFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 57     
          SeamFilter$FilterChainImpl.doFilter(ServletRequest, ServletResponse) line: 49     
          SeamFilter$FilterChainImpl.doFilter(ServletRequest, ServletResponse) line: 53     
          MultipartFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 79     
          SeamFilter$FilterChainImpl.doFilter(ServletRequest, ServletResponse) line: 49     
          SeamFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 84     
          ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202     
          ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173     
          ReplyHeaderFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 96     
          ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202     
          ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173     
          StandardWrapperValve.invoke(Request, Response) line: 213     
          StandardContextValve.invoke(Request, Response) line: 178     
          SecurityAssociationValve.invoke(Request, Response) line: 175     
          NonLoginAuthenticator(AuthenticatorBase).invoke(Request, Response) line: 432     
          JaccContextValve.invoke(Request, Response) line: 74     
          StandardHostValve.invoke(Request, Response) line: 126     
          ErrorReportValve.invoke(Request, Response) line: 105     
          CachedConnectionValve.invoke(Request, Response) line: 156     
          StandardEngineValve.invoke(Request, Response) line: 107     
          CoyoteAdapter.service(Request, Response) line: 148     
          Http11Processor.process(InputStream, OutputStream) line: 869     
          Http11Protocol$JmxHttp11ConnectionHandler(Http11BaseProtocol$Http11ConnectionHandler).processConnection(TcpConnection, Object[]) line: 664     
          PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527     
          MasterSlaveWorkerThread.run() line: 112     
          ThreadWithAttributes(Thread).run() line: 595