summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/prado
diff options
context:
space:
mode:
authorwei <>2007-01-24 05:52:22 +0000
committerwei <>2007-01-24 05:52:22 +0000
commite306989c6d03aac37e2557465b4812ea21970065 (patch)
tree7e2524a33cedf49831eb3c5ae15cd1bed3c3ab2c /framework/Web/Javascripts/prado
parentdec4042d10caa5a54b753fab950f16218fa62d8d (diff)
Fixed #517, #519, #521
Diffstat (limited to 'framework/Web/Javascripts/prado')
-rw-r--r--framework/Web/Javascripts/prado/activecontrols3.js7
-rw-r--r--framework/Web/Javascripts/prado/controls.js14
-rw-r--r--framework/Web/Javascripts/prado/validation3.js18
3 files changed, 27 insertions, 12 deletions
diff --git a/framework/Web/Javascripts/prado/activecontrols3.js b/framework/Web/Javascripts/prado/activecontrols3.js
index ecdc94cb..bb61d8ea 100644
--- a/framework/Web/Javascripts/prado/activecontrols3.js
+++ b/framework/Web/Javascripts/prado/activecontrols3.js
@@ -200,8 +200,11 @@ Prado.WebUI.ActiveListControl = Base.extend(
constructor : function(options)
{
this.element = $(options.ID);
- this.options = options;
- Event.observe(this.element, "change", this.doCallback.bind(this));
+ if(this.element)
+ {
+ this.options = options;
+ Event.observe(this.element, "change", this.doCallback.bind(this));
+ }
},
doCallback : function(event)
diff --git a/framework/Web/Javascripts/prado/controls.js b/framework/Web/Javascripts/prado/controls.js
index 390b1a25..2127732d 100644
--- a/framework/Web/Javascripts/prado/controls.js
+++ b/framework/Web/Javascripts/prado/controls.js
@@ -9,8 +9,11 @@ Prado.WebUI.PostBackControl.prototype =
this._elementOnClick = null, //capture the element's onclick function
this.element = $(options.ID);
- if(this.onInit)
- this.onInit(options);
+ if(this.element)
+ {
+ if(this.onInit)
+ this.onInit(options);
+ }
},
onInit : function(options)
@@ -127,8 +130,11 @@ Object.extend(Prado.WebUI.TRadioButton.prototype,
initialize : function(options)
{
this.element = $(options['ID']);
- if(!this.element.checked)
- this.onRadioButtonInitialize(options);
+ if(this.element)
+ {
+ if(!this.element.checked)
+ this.onRadioButtonInitialize(options);
+ }
}
});
diff --git a/framework/Web/Javascripts/prado/validation3.js b/framework/Web/Javascripts/prado/validation3.js
index b1734452..4158369f 100644
--- a/framework/Web/Javascripts/prado/validation3.js
+++ b/framework/Web/Javascripts/prado/validation3.js
@@ -376,9 +376,12 @@ Prado.WebUI.TValidationSummary.prototype =
this.options = options;
this.group = options.ValidationGroup;
this.messages = $(options.ID);
- this.visible = this.messages.style.visibility != "hidden"
- this.visible = this.visible && this.messages.style.display != "none";
- Prado.Validation.addSummary(options.FormID, this);
+ if(this.messages)
+ {
+ this.visible = this.messages.style.visibility != "hidden"
+ this.visible = this.visible && this.messages.style.display != "none";
+ Prado.Validation.addSummary(options.FormID, this);
+ }
},
/**
@@ -589,13 +592,16 @@ Prado.WebUI.TBaseValidator.prototype =
this._isObserving = {};
this.group = null;
this.requestDispatched = false;
-
+
this.options = options;
this.control = $(options.ControlToValidate);
this.message = $(options.ID);
- this.group = options.ValidationGroup;
+ if(this.control && this.message)
+ {
+ this.group = options.ValidationGroup;
- this.manager = Prado.Validation.addValidator(options.FormID, this);
+ this.manager = Prado.Validation.addValidator(options.FormID, this);
+ }
},
/**