4 Replies Latest reply on Dec 3, 2007 7:08 AM by ilya_shaikovsky

    tabpanel valuechange problem

    tomba

      Hi,

      first of all, I'm using
      JSF 1.2_06 RI
      Richfaces 3.1.x (doesn't matter which one, happens in all versions)
      Facelets 1.1.13

      Now, my rich:tabpanel causes problems that the valueChangeListener is not working as it should. When I change tabs I get the following error:

      29-nov-2007 11:20:40 com.sun.faces.lifecycle.UpdateModelValuesPhase execute
      WARNING: /quote/input.jsp @26,81 valueChangeListener="#{quoteInput.changeTab}": Method not found: be.sofico.web.mgbean.quote.Input@1535a58.changeTab()


      My page looks like this:

      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      <head></head>
      <body>
      <ui:composition template="${path.static}/template/template.jsp">
      
       <ui:define name="title">
       Create quote
       </ui:define>
      
       <ui:define name="body">
       <h1>Create quote</h1>
       <h:form>
       <rich:tabPanel switchType="ajax" valueChangeListener="#{quoteInput.changeTab}">
       <rich:tab id="vehicletab" label="#{msg.quote_tab_vehicle}">
       </rich:tab>
       <rich:tab id="optionstab" label="#{msg.quote_tab_options}">
       </rich:tab>
       <rich:tab id="financetab" binding="#{quoteInput.financeTab}" label="#{msg.quote_tab_finance}">
       </rich:tab>
       </rich:tabPanel>
       </h:form>
       </ui:define>
      </ui:composition>
      </body>
      </html>
      


      I am however sure that this method exists and it did work as long as we didn't use facelets. :( In fact the method signature is as follows:
      public void changeTab(ValueChangeEvent event) throws MWSException

      Did anyone have similar problems or something and could this be a bug?

        • 1. Re: tabpanel valuechange problem
          tomba

          Surprisingly, when I change my valuechange method to

          public void changeTab()

          I get this:

          java.lang.IllegalArgumentException: wrong number of arguments
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          java.lang.reflect.Method.invoke(Method.java:585)
          org.apache.el.parser.AstValue.invoke(AstValue.java:131)
          org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
          com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
          com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
          javax.faces.component.MethodBindingValueChangeListener.processValueChange(MethodBindingValueChangeListener.java:96)
          


          which I would consider correct behaviour...

          • 2. Re: tabpanel valuechange problem
            ilya_shaikovsky
            • 3. Re: tabpanel valuechange problem
              tomba

              Thank you very much!

              Is there an ETA on 3.2.0 known already?

              • 4. Re: tabpanel valuechange problem
                ilya_shaikovsky

                I think this bug will be included in 3.1.3 fixes. 3.1.3 should be ready in a week or two.