-
1. Re: "TypeError: $(...).trigger is not a function" thrown in function richfaces.cleanDom
bleathem May 27, 2013 7:40 PM (in response to daroslav)I'm not sure what would trigger this error, but I'd be very interested to hear the results if you could track it down. You could edit the javascript file to check if the function exists, and record some debug information if it does not exist. This would help in tracking down the cause of the problem.
-
2. Re: "TypeError: $(...).trigger is not a function" thrown in function richfaces.cleanDom
crucify Jun 3, 2013 6:55 AM (in response to bleathem)1 of 1 people found this helpfulI think I've found the problem.
In richfaces.js there's following code.( start from line 13)
(function(jQuery, richfaces) {
.......
then the author used both $ and jQuery in this block. He premised var $ existed in the globle scope.
}(jQuery, RichFaces));
which is WRONG.
it should be
(function($, richfaces) {
.......
}(jQuery, RichFaces));
or never use $ in the block because user could call jQuery.noConflict() anywhere to remove the definition of $ in the global scope.
-
3. Re: "TypeError: $(...).trigger is not a function" thrown in function richfaces.cleanDom
lfryc Jun 3, 2013 9:12 AM (in response to crucify)1 of 1 people found this helpfulIt's a theme of this pull request:
https://github.com/richfaces4/core/pull/17
and issue:
https://issues.jboss.org/browse/RF-12833
We should really use one - either $ or jQuery.
As suggested in a issue, you can patch the richfaces.js manually and use RichFaces Resource Mapping to provide patched resource.
-
4. Re: "TypeError: $(...).trigger is not a function" thrown in function richfaces.cleanDom
lfryc Jun 3, 2013 9:15 AM (in response to lfryc)Imo we should address this problem in scope of 4.3.3 and replace all conflicting occurences of $.
-
5. Re: "TypeError: $(...).trigger is not a function" thrown in function richfaces.cleanDom
bleathem Jun 7, 2013 6:51 PM (in response to lfryc)+1 - can you make sure there is a jira filed and scheduled to address this?