8 Replies Latest reply: Oct 27, 2010 2:34 AM by Ilya Shaikovsky RSS

pickList error

Shervin Asgari Master

I am trying to use the pickList but I get the following error in Firebug.

 

The code I am trying is the simplest form. When it is rendered the error message in firebug appears, and the pickList is rendered, but I cannot use it. It doesnt copy anything and I cannot choose anything either.

 

 

        <rich:pickList>
            <f:selectItem itemLabel="Option 1" itemValue="1"/>
            <f:selectItem itemLabel="Option 2" itemValue="2"/>
            <f:selectItem itemLabel="Option 3" itemValue="3"/>
            <f:selectItem itemLabel="Option 4" itemValue="4"/>
            <f:selectItem itemLabel="Option 5" itemValue="5"/>
        </rich:pickList>

this.focusKeeper.observe is not a function

  • 1. Re: pickList error
    Ilya Shaikovsky Master

    seems you using some external jQuery or prototype libraries on your page (or some widgets based on them). In such cases conflicts could appear between built-in and externally loaded libraries.

  • 2. Re: pickList error
    Shervin Asgari Master

    Aaah. Bullocks!

    You are of course right. We are using external JQuery and not richfaces built-in.

     

    Any workarounds other than removing our external JQuery?

  • 3. Re: pickList error
    Ilya Shaikovsky Master

    I'm afraid could only propose two obvious ways to choose:

    • exclude our jQuery - we using some patches to resolve some issues, so in that case some components behavior could be affected.
    • exclude your external jQuery and use bundled with RF
  • 4. Re: pickList error
    Shervin Asgari Master

    Thanks for the answer.

     

    I think we will have to try to exclude richfaces jQuery. We are using it exensivly and we only have a few RichFaces components, so hopefully it will not be affected.

     

    By the way. If I only want to disable JQuery, and not Prototype since we are only using JQuery. How can I do this?

  • 5. Re: pickList error
    Shervin Asgari Master

    I tried to disable JQuery but it still doesn't work.

     

    <context-param>
            <param-name>org.richfaces.ExcludeScripts</param-name>
            <param-value>JQuery</param-value>
        </context-param>
    

     

    I also tried

     

    <context-param>
            <param-name>org.richfaces.ExcludeScripts</param-name>
            <param-value>Prototype,Scriptaculous</param-value>
        </context-param>

     

    but I I get these two error messages message both times:

     

    this.focusKeeper.observe is not a function

     

    element.dispatchEvent is not a function
  • 6. Re: pickList error
    Ilya Shaikovsky Master

    Doh.. I just looked to source code and realized that the parameter is only actual for 3.1.x and not present in 3.3.x Why can't you using built-in jQuery? Conflicts with some your plugins?

  • 7. Re: pickList error
    Shervin Asgari Master

    Wow, thats strange.

    Must be a reason why the Richfaces team chose to remove it from the 3.1.x branch.

    Do you know anything about that?

     

    We are using JQuery 1.3.X

    I haven't tested JQuery version shipped with Richfaces, but if it is 1.4 or later, then our code as is won't work.

    We have a lot of JQuery code, so it would be a lot of work to switch if I am not mistaken.

     

    The other reason, why I wanted to avoid doing that, is because later version of Richfaces probably uses the 1.4 version of JQuery, and that would hinder us to upgrade Richfaces version before altering the code to be 1.4 suitable.

     

    UPDATE

    By the way, is it sufficient that remove all our JQuery code and use RichFaces JQuery only on that particular page where I want the PickList?

  • 8. Re: pickList error
    Ilya Shaikovsky Master

    RF 3.3.3 Final using 1.3.2  so maybe could be used in your case?

     

    1.4 version used starting from 4.x.

     

    I'm not sure why and when it was removed without going though entire history Prabably after some review it appeared that much components affected by external versions without our patches. Now will update FAQ with that info...