[richfaces-issues] [JBoss JIRA] (RF-12833) richfaces.js conflicts with prototype.js

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Mon Apr 15 06:55:53 EDT 2013


    [ https://issues.jboss.org/browse/RF-12833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767202#comment-12767202 ] 

Lukáš Fryč edited comment on RF-12833 at 4/15/13 6:55 AM:
----------------------------------------------------------

This patch doesn't fix the issue either - I would propose this change:

{code}
window.RichFaces = window.RichFaces || {};

RichFaces.jQuery = RichFaces.jQuery || jQuery;


(function(jQuery, richfaces) {
   ...
}(RichFaces.jQuery, RichFaces));
{code}

This way, users can initialize {{RichFaces.jQuery}} prior processing of {{richfaces.js}} - it will cause RichFaces to grab any version of jQuery you require (e.g. "noConflicted" version):

{code}
var myJQuery = jQuery.noConflict();
...
RichFaces.jQuery = myJQuery;
{code}
                
      was (Author: lfryc):
    This patch doesn't fix the issue either - I would propose this change:

{code}
window.RichFaces = window.RichFaces || {};

RichFaces.jQuery = RichFaces.jQuery || jQuery;


(function(jQuery, richfaces) {
   ...
}(RichFaces.jQuery, RichFaces));
{code}

This way, users can initialize {{RichFaces.jQuery}} prior processing of {{richfaces.js}} - it will cause RichFaces to grab any version of jQuery you require (e.g. "noConflicted" version).
                  
> richfaces.js conflicts with prototype.js
> ----------------------------------------
>
>                 Key: RF-12833
>                 URL: https://issues.jboss.org/browse/RF-12833
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-a4j-core
>    Affects Versions: 4.3.1
>            Reporter: Mark Torres
>             Fix For: 5-Tracking
>
>
> Getting some javascript errors on richfaces.js.
> Upon inspection, it is using
> (function(jQuery, richfaces) {
> ...
> instead of 
> (function($, richfaces) {
> ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list