protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     if(RelatedPopup != null && !IsDesign)
         descriptor.AddComponentProperty("relatedPopup", RelatedPopup.ClientID);
     descriptor.AddProperty("autoClose", AutoClose);
 }
示例#2
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     SharpLayersScriptObjectBuilder.DescribeComponent(this, descriptor, this, this);
     if (SupportsClientState)
     {
         descriptor.AddElementProperty("clientStateField", ClientStateFieldID);
     }
 }
示例#3
0
 protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors()
 {
     EnsureID();
     ScriptComponentDescriptor descriptor = new ScriptComponentDescriptor(ScriptComponentName);
     descriptor.ID = ClientID;
     DescribeComponent(descriptor);
     yield return descriptor;
 }
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     if (_editPanel != null)
     {
         descriptor.AddComponentProperty("editPanel", _editPanel.ClientID);
     }
 }
        private void AddControlIDToScript(ScriptComponentDescriptor descriptor, string id)
        {
            Control control = this.FindControl(id);

            if (control != null)
            {
                descriptor.AddElementProperty(id, control.ClientID);
            }
        }
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     if(FixedColorButtonId.Length > 0 && !IsDesign) {
         var but = Parent.FindControl(FixedColorButtonId) as FixedColorButton;
         if(but != null)
             descriptor.AddComponentProperty("fixedColorButton", but.ClientID);
         else
             throw new ArgumentException("FixedColorButton control's ID expected");
     }
 }
		public void ScriptComponentDescriptor_ctor_exception_1 () {
			ScriptComponentDescriptor scd = new ScriptComponentDescriptor (null);
		}
 public ScriptComponentDescriptorWrapper(ScriptComponentDescriptor descriptor)
 {
     _descriptor = descriptor;
 }
示例#9
0
 /// <summary>
 /// DescribeComponent
 /// </summary>
 /// <param name="descriptor"></param>
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddElementProperty("headerTab", "__tab_" + ClientID);
     if (_owner != null)
     {
         descriptor.AddComponentProperty("owner", _owner.ClientID);
     }
 }
        protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
        {
            base.DescribeComponent(descriptor);
            if(IsDesignMode)
                return;

            descriptor.AddProperty("contextKey", ContextKey);
            descriptor.AddProperty("postBackUrl", Page.Request.RawUrl);
            descriptor.AddProperty("serverPollingSupport", ServerPollingSupport);
            descriptor.AddProperty("enabled", Enabled);

            if(ThrobberID != String.Empty) {
                Control control = FindControl(ThrobberID);
                if(control != null)
                    descriptor.AddElementProperty("throbber", control.ClientID);
            }
        }
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddElementProperty("contentDiv", _contentDiv.ClientID);
 }
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddComponentProperty("colorDiv", ColorDiv.ClientID);
     if (this.MethodButton != null)
     {
         descriptor.AddComponentProperty("methodButton", MethodButton.ClientID);
     }
 }
示例#13
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor) {
     base.DescribeComponent(descriptor);
     descriptor.AddComponentProperty("editPanel", EditPanel.ClientID);
     if(_changingToolbar != null) descriptor.AddComponentProperty("changingToolbar", _changingToolbar.ClientID);
 }
示例#14
0
        private void SetScriptControlProperties(ScriptComponentDescriptor descriptor)
        {
            if (!String.IsNullOrEmpty(this.ConfigPath))
            {
                Options = RichText.GetOptions(ConfigPath);
                descriptor.AddProperty("options", this.Options);
            }
            else
                descriptor.AddProperty("options",this.Options);
            
            if (!String.IsNullOrEmpty(Options))
                return;

            descriptor.AddProperty("theme", Theme);
            descriptor.AddProperty("plugins", Plugins);
            descriptor.AddProperty("theme_advanced_buttons1", Theme_advanced_buttons1);
            descriptor.AddProperty("theme_advanced_buttons2", Theme_advanced_buttons2);
            descriptor.AddProperty("theme_advanced_buttons3", Theme_advanced_buttons3);
            descriptor.AddProperty("theme_advanced_buttons4", Theme_advanced_buttons4);
            descriptor.AddProperty("theme_advanced_toolbar_location", Theme_advanced_toolbar_location);
            descriptor.AddProperty("theme_advanced_path_location", Theme_advanced_path_location);
            descriptor.AddProperty("theme_advanced_resizing", Theme_advanced_resizing);
            descriptor.AddProperty("theme_advanced_resize_horizontal", Theme_advanced_resize_horizontal);
            descriptor.AddProperty("theme_advanced_toolbar_align", Theme_advanced_toolbar_align);
            descriptor.AddProperty("content_css", Content_css);
            descriptor.AddProperty("auto_resize", Auto_resize);
            descriptor.AddProperty("table_styles", Table_styles);
            descriptor.AddProperty("table_cell_styles", Table_cell_styles);
            descriptor.AddProperty("table_row_styles", Table_row_styles);
            descriptor.AddProperty("theme_advanced_styles", Theme_advanced_styles);
            descriptor.AddProperty("font_size_style_values", String.IsNullOrEmpty(Font_size_style_values) ? string.Empty : Font_size_style_values);
        }
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddProperty("defaultTarget", DefaultTarget);
 }
        // override the base method
        protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
        {
            // Register fields and handlers for use in client-side

            if (FieldsetWidth != null) if (FieldsetWidth.ClientID.Length > 0) RegisteredFields.Add(new RegisteredField("width", FieldsetWidth));
            if (FieldsetHeight != null) if (FieldsetHeight.ClientID.Length > 0) RegisteredFields.Add(new RegisteredField("height", FieldsetHeight));
            if (WidthUnitToggle != null) RegisteredHandlers.Add(new RegisteredField("widthUnitToggle", WidthUnitToggle));
            if (HeightUnitToggle != null) RegisteredHandlers.Add(new RegisteredField("heightUnitToggle", HeightUnitToggle));
            if (Padding != null) if (Padding.ClientID.Length > 0) RegisteredFields.Add(new RegisteredField("padding", Padding));
            if (Margin != null) if (Margin.ClientID.Length > 0) RegisteredFields.Add(new RegisteredField("margin", Margin));

            base.DescribeComponent(descriptor);
        }
        protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
        {
            base.DescribeComponent(descriptor);
            if(!IsDesignMode) {
                if(this._hiddenFieldID != String.Empty) descriptor.AddElementProperty("hiddenField", this._hiddenFieldID);
                if(this._innerTBID != String.Empty) descriptor.AddElementProperty("innerTB", this._innerTBID);
                if(this._inputFile != null) descriptor.AddElementProperty("inputFile", this._inputFile.Name.Replace("$", "_"));
                descriptor.AddProperty("postBackUrl", Page.Response.ApplyAppPathModifier(Page.Request.RawUrl));
                descriptor.AddProperty("formName", Path.GetFileName(this.Page.Form.Name));
                if(CompleteBackColor != Color.Empty)
                    descriptor.AddProperty("completeBackColor", ColorTranslator.ToHtml(CompleteBackColor));

                if(ErrorBackColor != Color.Empty)
                    descriptor.AddProperty("errorBackColor", ColorTranslator.ToHtml(ErrorBackColor));

                if(UploadingBackColor != Color.Empty)
                    descriptor.AddProperty("uploadingBackColor", ColorTranslator.ToHtml(UploadingBackColor));

                if(ThrobberID != string.Empty) {
                    var control = this.FindControl(ThrobberID);
                    if(control != null)
                        descriptor.AddElementProperty("throbber", control.ClientID);
                }
            }
        }
示例#18
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddElementProperty("container", ContainerID);
 }
示例#19
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddElementProperty("contentChangedElement", this.ContentChangedId);
     descriptor.AddElementProperty("contentForceElement", this.ContentForceId);
     descriptor.AddElementProperty("contentElement", this.ContentId);
     descriptor.AddElementProperty("activeModeElement", this.ActiveModeId);
 }
		public static void DescribeComponent(object instance, ScriptComponentDescriptor descriptor, IUrlResolutionService urlResolver, IControlResolver controlResolver)
		{
			// validate preconditions
			if (instance == null) throw new ArgumentNullException("instance");
			if (descriptor == null) throw new ArgumentNullException("descriptor");
			if (urlResolver == null) urlResolver = instance as IUrlResolutionService;
			if (controlResolver == null) controlResolver = instance as IControlResolver;

			// describe properties
			// PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(instance);

			PropertyInfo[] properties = instance.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);

			foreach (PropertyInfo prop in properties)
			{
				ScriptControlPropertyAttribute propAttr = null;
				ScriptControlEventAttribute eventAttr = null;
				string propertyName = prop.Name;

				System.ComponentModel.AttributeCollection attribs = new System.ComponentModel.AttributeCollection(Attribute.GetCustomAttributes(prop, false));

				// Try getting a property attribute
				propAttr = (ScriptControlPropertyAttribute)attribs[typeof(ScriptControlPropertyAttribute)];
				if (propAttr == null || !propAttr.IsScriptProperty)
				{
					// Try getting an event attribute
					eventAttr = (ScriptControlEventAttribute)attribs[typeof(ScriptControlEventAttribute)];
					if (eventAttr == null || !eventAttr.IsScriptEvent)
					{
						continue;
					}
				}

				// attempt to rename the property/event
				ClientPropertyNameAttribute nameAttr = (ClientPropertyNameAttribute)attribs[typeof(ClientPropertyNameAttribute)];
				if (nameAttr != null && !string.IsNullOrEmpty(nameAttr.PropertyName))
				{
					propertyName = nameAttr.PropertyName;
				}

				// determine whether to serialize the value of a property.  readOnly properties should always be serialized
				//bool serialize = true;// prop.ShouldSerializeValue(instance) || prop.IsReadOnly;
				//if (serialize)
				//{
				// get the value of the property, skip if it is null
				Control c = null;
				object value = prop.GetValue(instance, new object[0] { });
				if (value == null)
				{
					continue;
				}

				// convert and resolve the value
				if (eventAttr != null && prop.PropertyType != typeof(String))
				{
					throw new InvalidOperationException("ScriptControlEventAttribute can only be applied to a property with a PropertyType of System.String.");
				}
				else
				{
					if (!prop.PropertyType.IsPrimitive && !prop.PropertyType.IsEnum)
					{
						if (prop.PropertyType == typeof(Color))
						{
							value = ColorTranslator.ToHtml((Color)value);
						}
						else
						{
							// TODO: Determine if we should let ASP.NET AJAX handle this type of conversion, as it supports JSON serialization
							//TypeConverter conv = prop.Converter;
							//value = conv.ConvertToString(null, CultureInfo.InvariantCulture, value);

							//if (prop.PropertyType == typeof(CssStyleCollection))
							//    value = (new CssStyleCollectionJSCoverter()).Serialize(value, new JavaScriptSerializer());
							//if (prop.PropertyType == typeof(Style))
							//    value = (new CssStyleCollectionJSCoverter()).Serialize(((Style)value).GetStyleAttributes(null), new JavaScriptSerializer());                                

							Type valueType = value.GetType();

							JavaScriptConverterAttribute attr = (JavaScriptConverterAttribute)attribs[typeof(JavaScriptConverterAttribute)];
							JavaScriptConverter converter = attr != null ?
								(JavaScriptConverter)TypeCreator.CreateInstance(attr.ConverterType) :
								JSONSerializerFactory.GetJavaScriptConverter(valueType);

							if (converter != null)
								value = converter.Serialize(value, JSONSerializerFactory.GetJavaScriptSerializer());
							else
								value = JSONSerializerExecute.PreSerializeObject(value);

							//Dictionary<string, object> dict = value as Dictionary<string, object>;
							//if (dict != null && !dict.ContainsKey("__type"))
							//    dict["__type"] = valueType.AssemblyQualifiedName;
						}
					}
					if (attribs[typeof(IDReferencePropertyAttribute)] != null && controlResolver != null)
					{
						c = controlResolver.ResolveControl((string)value);
					}
					if (attribs[typeof(UrlPropertyAttribute)] != null && urlResolver != null)
					{
						value = urlResolver.ResolveClientUrl((string)value);
					}
				}

				// add the value as an appropriate description
				if (eventAttr != null)
				{
					if (!string.IsNullOrEmpty((string)value))
						descriptor.AddEvent(propertyName, (string)value);
				}
				else if (attribs[typeof(ElementReferenceAttribute)] != null)
				{
					if (c == null && controlResolver != null) c = controlResolver.ResolveControl((string)value);
					if (c != null) value = c.ClientID;
					descriptor.AddElementProperty(propertyName, (string)value);
				}
				else if (attribs[typeof(ComponentReferenceAttribute)] != null)
				{
					if (c == null && controlResolver != null) c = controlResolver.ResolveControl((string)value);
					if (c != null)
					{
						//ExtenderControlBase ex = c as ExtenderControlBase;
						//if (ex != null && ex.BehaviorID.Length > 0)
						//    value = ex.BehaviorID;
						//else
						value = c.ClientID;
					}
					descriptor.AddComponentProperty(propertyName, (string)value);
				}
				else
				{
					if (c != null) value = c.ClientID;
					descriptor.AddProperty(propertyName, value);
				}
			}
			//}

			// determine if we should describe methods
			foreach (MethodInfo method in instance.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public))
			{
				ScriptControlMethodAttribute methAttr = (ScriptControlMethodAttribute)Attribute.GetCustomAttribute(method, typeof(ScriptControlMethodAttribute));
				if (methAttr == null || !methAttr.IsScriptMethod)
				{
					continue;
				}

				// We only need to support emitting the callback target and registering the WebForms.js script if there is at least one valid method
				Control control = instance as Control;
				if (control != null)
				{
					// Force WebForms.js
					control.Page.ClientScript.GetCallbackEventReference(control, null, null, null);

					// Add the callback target
					descriptor.AddProperty("_callbackTarget", control.UniqueID);
				}
				break;
			}
		}
		public void ScriptComponentDescriptor_ctor_exception_2 () {
			ScriptComponentDescriptor scd = new ScriptComponentDescriptor (String.Empty);
		}
示例#22
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     // add to the popup link to CSS file used for the 'QuickFormatting control'
     descriptor.AddProperty("additionalCss", Page.ClientScript.GetWebResourceUrl(typeof(QuickFormatting), "Obout.Ajax.UI.HTMLEditor.QF.QuickFormatting.css"));
     // call base method
     base.DescribeComponent(descriptor);
 }
        protected virtual void DescribeComponent(ScriptComponentDescriptor descriptor)
        {
            try {
                _renderingScript = true;
                ComponentDescriber.DescribeComponent(this, new ScriptComponentDescriptorWrapper(descriptor), this.Page, this);
            } finally {
                _renderingScript = false;
            }

            if(SupportsClientState)
                descriptor.AddElementProperty("clientStateField", ClientStateFieldID);
        }
示例#24
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     descriptor.AddProperty("styleItemID", _item.ClientID);
     base.DescribeComponent(descriptor);
 }
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddProperty("tabStripPlacement", this.TabStripPlacement);
     descriptor.AddProperty("useVerticalStripPlacement", this.UseVerticalStripPlacement);
     descriptor.AddProperty("onDemand", this.OnDemand);
 }
示例#26
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="descriptor"></param>
 ///<remarks></remarks>
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     //descriptor.AddProperty("items", (new MenuCollectionTypeConvert()).ConvertToString(this.Items));
 }
示例#27
0
 /// <summary>
 /// Describes the settings for this control.
 /// </summary>
 /// <param name="descriptor"></param>
 protected virtual void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     try
     {
         _renderingScript = true;
         ScriptObjectBuilder.DescribeComponent(this, descriptor, this, this);
     }
     finally
     {
         _renderingScript = false;
     }
     if (SupportsClientState)
     {
         descriptor.AddElementProperty("clientStateField", ClientStateFieldID);
     }
 }
        public static void DescribeComponent(object instance, ScriptComponentDescriptor descriptor, IUrlResolutionService urlResolver, IControlResolver controlResolver)
        {
            // validate preconditions
            if (instance == null) throw new ArgumentNullException("instance");
            if (descriptor == null) throw new ArgumentNullException("descriptor");
            if (urlResolver == null) urlResolver = instance as IUrlResolutionService;
            if (controlResolver == null) controlResolver = instance as IControlResolver;

            // describe properties
            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(instance);
            foreach (PropertyDescriptor prop in properties)
            {
                ExtenderControlPropertyAttribute propAttr = null;
                ExtenderControlEventAttribute eventAttr = null;

                ClientPropertyNameAttribute nameAttr = null;
                IDReferencePropertyAttribute idRefAttr = null;
                UrlPropertyAttribute urlAttr = null;
                ElementReferenceAttribute elementAttr = null;
                ComponentReferenceAttribute compAttr = null;

                foreach (Attribute attr in prop.Attributes)
                {
                    Type attrType = attr.GetType();
                    if (attrType == typeof(ExtenderControlPropertyAttribute))
                        propAttr = attr as ExtenderControlPropertyAttribute;
                    else if (attrType == typeof(ExtenderControlEventAttribute))
                        eventAttr = attr as ExtenderControlEventAttribute;
                    else if (attrType == typeof(ClientPropertyNameAttribute))
                        nameAttr = attr as ClientPropertyNameAttribute;
                    else if (attrType == typeof(IDReferencePropertyAttribute))
                        idRefAttr = attr as IDReferencePropertyAttribute;
                    else if (attrType == typeof(UrlPropertyAttribute))
                        urlAttr = attr as UrlPropertyAttribute;
                    else if (attrType == typeof(ElementReferenceAttribute))
                        elementAttr = attr as ElementReferenceAttribute;
                    else if (attrType == typeof(ComponentReferenceAttribute))
                        compAttr = attr as ComponentReferenceAttribute;
                }

                string propertyName = prop.Name;

                // Try getting a property attribute
                if (propAttr == null || !propAttr.IsScriptProperty)
                {
                    // Try getting an event attribute
                    if (eventAttr == null || !eventAttr.IsScriptEvent)
                    {
                        continue;
                    }
                }

                // attempt to rename the property/event
                if (nameAttr != null && !string.IsNullOrEmpty(nameAttr.PropertyName))
                {
                    propertyName = nameAttr.PropertyName;
                }

                // determine whether to serialize the value of a property.  readOnly properties should always be serialized
                bool serialize = prop.ShouldSerializeValue(instance) || prop.IsReadOnly;
                if (serialize)
                {
                    // get the value of the property, skip if it is null
                    Control c = null;
                    object value = prop.GetValue(instance);
                    if (value == null)
                    {
                        continue;
                    }

                    // convert and resolve the value
                    if (eventAttr != null && prop.PropertyType != typeof(String))
                    {
                        throw new InvalidOperationException("ExtenderControlEventAttribute can only be applied to a property with a PropertyType of System.String.");
                    }
                    else
                    {
                        if (!prop.PropertyType.IsPrimitive && !prop.PropertyType.IsEnum)
                        {
                            // Check if we can use any of our custom converters
                            // (first do a direct lookup on the property type,
                            // but also check all of its base types if nothing
                            // was found)
                            Converter<object, string> customConverter = null;
                            if (!_customConverters.TryGetValue(prop.PropertyType, out customConverter))
                            {
                                foreach (KeyValuePair<Type, Converter<object, string>> pair in _customConverters)
                                {
                                    if (prop.PropertyType.IsSubclassOf(pair.Key))
                                    {
                                        customConverter = pair.Value;
                                        break;
                                    }
                                }
                            }

                            // Use the custom converter if found, otherwise use
                            // its current type converter
                            if (customConverter != null)
                            {
                                value = customConverter(value);
                            }
                            else
                            {
                                // Determine if we should let ASP.NET AJAX handle this type of conversion, as it supports JSON serialization
                                if (propAttr != null && propAttr.UseJsonSerialization)
                                {
                                    // Use ASP.NET JSON serialization
                                }
                                else
                                {
                                    // Use the property's own converter
                                    TypeConverter conv = prop.Converter;
                                    value = conv.ConvertToString(null, CultureInfo.InvariantCulture, value);
                                }
                            }
                        }
                        if (idRefAttr != null && controlResolver != null)
                        {
                            c = controlResolver.ResolveControl((string)value);
                        }
                        if (urlAttr != null && urlResolver != null)
                        {
                            value = urlResolver.ResolveClientUrl((string)value);
                        }
                    }

                    // add the value as an appropriate description
                    if (eventAttr != null)
                    {
                        descriptor.AddEvent(propertyName, (string)value);
                    }
                    else if (elementAttr != null)
                    {
                        if (c == null && controlResolver != null) c = controlResolver.ResolveControl((string)value);
                        if (c != null) value = c.ClientID;
                        descriptor.AddElementProperty(propertyName, (string)value);
                    }
                    else if (compAttr != null)
                    {
                        if (c == null && controlResolver != null) c = controlResolver.ResolveControl((string)value);
                        if (c != null)
                        {
                            ExtenderControlBase ex = c as ExtenderControlBase;
                            if (ex != null && ex.BehaviorID.Length > 0)
                                value = ex.BehaviorID;
                            else
                                value = c.ClientID;
                        }
                        descriptor.AddComponentProperty(propertyName, (string)value);
                    }
                    else
                    {
                        if (c != null) value = c.ClientID;
                        descriptor.AddProperty(propertyName, value);
                    }
                }
            }

            // determine if we should describe methods
            foreach (MethodInfo method in instance.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public))
            {
                ExtenderControlMethodAttribute methAttr = (ExtenderControlMethodAttribute)Attribute.GetCustomAttribute(method, typeof(ExtenderControlMethodAttribute));
                if (methAttr == null || !methAttr.IsScriptMethod)
                {
                    continue;
                }

                // We only need to support emitting the callback target and registering the WebForms.js script if there is at least one valid method
                Control control = instance as Control;
                if (control != null)
                {
                    // Force WebForms.js
                    control.Page.ClientScript.GetCallbackEventReference(control, null, null, null);

                    // Add the callback target
                    descriptor.AddProperty("_callbackTarget", control.UniqueID);
                }
                break;
            }
        }
示例#29
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     base.DescribeComponent(descriptor);
     descriptor.AddElementProperty("iframe", _iframe.ClientID);
     descriptor.AddProperty("registeredFields", RegisteredFieldsIds);
     descriptor.AddProperty("registeredHandlers", RegisteredHandlersIds);
 }
示例#30
0
 protected override void DescribeComponent(ScriptComponentDescriptor descriptor)
 {
     descriptor.AddElementProperty("innerCell", cell.ClientID);
     descriptor.AddProperty("selectorID", selectorID);
     base.DescribeComponent(descriptor);
 }