Author: nbelaevski
Date: 2011-03-09 09:43:31 -0500 (Wed, 09 Mar 2011)
New Revision: 22106
Modified:
branches/4.0.X/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
Log:
https://issues.jboss.org/browse/RF-10722
Reviewed by Pavel
Modified:
branches/4.0.X/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
---
branches/4.0.X/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2011-03-09
14:38:43 UTC (rev 22105)
+++
branches/4.0.X/core/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2011-03-09
14:43:31 UTC (rev 22106)
@@ -415,7 +415,7 @@
__bindEventHandlers: function () {
},
destroy: function () {
- rf.Event.unbind(this.id, this.namespace);
+ rf.Event.unbindById(this.id, this.namespace);
$super.destroy.call(this);
}
});
Modified:
branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
===================================================================
---
branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2011-03-09
14:38:43 UTC (rev 22105)
+++
branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2011-03-09
14:43:31 UTC (rev 22106)
@@ -1,37 +1,6 @@
(function($, rf) {
-
- rf.ui = rf.ui || {};
// Constructor definition
- rf.ui.Base = function(componentId, options, defaultOptions) {
- this.namespace = "."+rf.Event.createNamespace(this.name, componentId);
- // call constructor of parent class
- $super.constructor.call(this, componentId);
- this.options = $.extend(this.options, defaultOptions, options);
- this.attachToDom();
- this.__bindEventHandlers();
- };
-
- // Extend component class and add protected methods from parent class to our container
- rf.BaseComponent.extend(rf.ui.Base);
-
- // define super class link
- var $super = rf.ui.Base.$super;
-
- $.extend(rf.ui.Base.prototype, {
- __bindEventHandlers: function () {
- },
- destroy: function () {
- rf.Event.unbindById(this.id, this.namespace);
- $super.destroy.call(this);
- }
- });
-
-})(jQuery, window.RichFaces || (window.RichFaces={}));
-
-(function($, rf) {
-
- // Constructor definition
rf.ui.Message = function(componentId, options) {
// call constructor of parent class
$super.constructor.call(this, componentId, options, defaultOptions);
@@ -90,11 +59,13 @@
}
}
+ var bindEventHandlers = function () {
+ rf.Event.bind(window.document, rf.Event.MESSAGE_EVENT_TYPE+this.namespace, onMessage,
this);
+ };
+
$.extend(rf.ui.Message.prototype, {
name: "Message",
- __bindEventHandlers: function () {
- rf.Event.bind(window.document, rf.Event.MESSAGE_EVENT_TYPE+this.namespace, onMessage,
this);
- }
+ __bindEventHandlers: bindEventHandlers
});
})(jQuery, window.RichFaces || (window.RichFaces={}));
\ No newline at end of file