2 Replies Latest reply on Jul 28, 2011 7:26 AM by niss

    Richfaces 3.1.6 javascript problems

    niss

      Hi everybody,

       

      I'm new to this forum, so I hope nobody already ask this question yet ...

       

      I'm migrating from Richfaces 3.0.1 to 3.1.6 because I need the <rich:tooltip> component.

      I'm using the following libraries : MyFaces 1.1.5, Tomahawk 1.1.9, jQuery 1.5.2.

       

      While using <rich:tooltip>, it doesn't work with this piece of code (that I found in the reference guide of version 3.1.6)

       

       

      I've the following javascript errors (Firefox 4) :

       

      Error: this.toolTip.style is undefined
      Source File: http://localhost:8888/appname/a4j_3_1_6.GAorg/richfaces/renderkit/html/scripts/tooltip.js.faces
      Line: 3
      
      Error: element.dispatchEvent is not a function
      Source File: http://localhost:8888/appname/a4j_3_1_6.GAorg.ajax4jsf.javascript.PrototypeScript.faces
      Line: 250
      

       

       

      I tried to use another component, <rich:calendar>, but with this code :

       

      <rich:calendar popup="true"/>
      

       

      I've the following javascript errors (Firefox 4) :

       

      Error: obj is undefined
      Source File: http://localhost:8888/appname/a4j_3_1_6.GAorg/richfaces/renderkit/html/scripts/calendar.js.faces
      Line: 98
      
      Error: element.dispatchEvent is not a function
      Source File: http://localhost:8888/appname/a4j_3_1_6.GAorg.ajax4jsf.javascript.PrototypeScript.faces
      Line: 250
      

       

       

      Does anyone already got these errors ? What am I doing wrong ? Do you need more information ?

       

      Thank you in advance for saving my life ;-)

       

      Nicolas.

        • 1. Re: Richfaces 3.1.6 javascript problems
          niss

          Note that I've found this thread :

          http://community.jboss.org/message/607298#607298

           

          But modifying all the javascript libraries that are using jQuery looks like a bit dirty to me. Isn't it ? I'm not a Javascript expert so I might be wrong.

          • 2. Re: Richfaces 3.1.6 javascript problems
            niss

            Well, problems solved :-)

             

             

            To solve the problem about :

             

            Error: element.dispatchEvent is not a function
            

             

            I've used this statement :

             

            jQuery.noConflict();
            

             

            and I've modified some lines of my jQuery scripts from $(...) to jQuery(...).

             

             

             

            About this problem :


            Error: this.toolTip.style is undefined
            

             

            It has been resolved by moving the jQuery.noConflict(); at the top of in my code. When it was more in the middle, I had the problem.

             

             

            Nicolas.