context: /********
   * This file is part of Ext.NET.
   *     
   * Ext.NET is free software: you can redistribute it and/or modify
   * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as 
   * published by the Free Software Foundation, either version 3 of the 
   * License, or (at your option) any later version.
   * 
   * Ext.NET is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
   * 
   * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
   * along with Ext.NET.  If not, see <http://www.gnu.org/licenses/>.
   *
   *
   * @version   : 2.0.0.beta - Community Edition (AGPLv3 License)
   * @author    : Ext.NET, Inc. http://www.ext.net/
   * @date      : 2012-03-07
   * @copyright : Copyright (c) 2007-2012, Ext.NET, Inc. (http://www.ext.net/). All rights reserved.
   * @license   : GNU AFFERO GENERAL PUBLIC LICENSE (AGPL) 3.0. 
   *              See license.txt and http://www.ext.net/license/.
   *              See AGPL License at http://www.gnu.org/licenses/agpl-3.0.txt
   ********/
  
  using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Text;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  using Ext.Net.Utilities;
  
  namespace Ext.Net
  {
      /// <summary>
      /// A class used to load remote content to a component.
      /// In general this class will not be instanced directly, rather a loader configuration will be passed to the constructor of the Ext.AbstractComponent
      /// </summary>
      [Browsable(false)]
      [Meta]
      public partial class ComponentLoader : Observable
      {
          /// <summary>
          /// 
          /// </summary>
          public ComponentLoader()
          {
          }
  
          protected override void OnBeforeClientInit(Observable sender)
          {
              if (this.Mode == LoadMode.Frame && this.AjaxOptions != null)
              {
               //   throw new Exception("Frame mode doesn't support AjaxOptions");
              }
              base.OnBeforeClientInit(sender);
          }
          
          /// <summary>
          /// 
          /// </summary>
          public override string InstanceOf
          {
              get
              {
                  return "Ext.ComponentLoader";
              }
          }
  
          /// <summary>
          ///True to add a unique cache-buster param to GET requests. (defaults to true)
          /// </summary>
          [DefaultValue(true)]
          [ConfigOption]
          [Meta]
          [NotifyParentProperty(true)]
          [Description("True to add a unique cache-buster param to GET requests. (defaults to true)")]
          public bool DisableCaching
          {
              get
              {
                  return this.State.Get<bool>("DisableCaching", true);
              }
              set
              {
                  this.State.Set("DisableCaching", value);
              }
          }
  
          /// <summary>
          /// Change the parameter which is sent went disabling caching through a cache buster. Defaults to '_dc'
          /// </summary>
          [ConfigOption]
          [Meta]
          [DefaultValue("_dc")]
          [NotifyParentProperty(true)]
          [Description("Change the parameter which is sent went disabling caching through a cache buster. Defaults to '_dc'")]
          public string DisableCachingParam
          {
              get
              {
                  return this.State.Get<string>("DisableCachingParam", "_dc");
              }
              set
              {
                  this.State.Set("DisableCachingParam", value);
              }
          }
  
          private AjaxOptions ajaxOptions;
  
          /// <summary>
          /// Any additional options to be passed to the request, for example timeout or headers.
          /// </summary>
          [Meta]
          [ConfigOption(JsonMode.Object)]
          [Category("Config Options")]
          [NotifyParentProperty(true)]
          [PersistenceMode(PersistenceMode.InnerProperty)]
          [Description("Any additional options to be passed to the request, for example timeout or headers.")]
          public virtual AjaxOptions AjaxOptions
          {
              get
              {
                  return this.ajaxOptions;
              }
              set
              {
                  this.ajaxOptions = value;
                  this.ajaxOptions.Owner = this;
              }
          }
  
          /// <summary>
          /// 
          /// </summary>
          [ConfigOption]
          [Meta]
          [DefaultValue(false)]
          [NotifyParentProperty(true)]
          [Description("")]
          public virtual bool PassParentSize
          {
              get
              {
                  return this.State.Get<bool>("PassParentSize", false);
              }
              set
              {
                  this.State.Set("PassParentSize", value);
              }
          }
  
          /// <summary>
          /// Event which triggers loading process. Default value is render
          /// </summary>
          [ConfigOption]
          [Meta]
          [DefaultValue("")]
          [NotifyParentProperty(true)]
          [Description("Event which triggers loading process. Default value is render")]
          public virtual string TriggerEvent
          {
              get
              {
                  return this.State.Get<string>("TriggerEvent", "").ToLowerInvariant();
              }
              set
              {
                  this.State.Set("TriggerEvent", value);
              }
          }
  
          /// <summary>
          /// TriggerEvent's control
          /// </summary>
          [ConfigOption]
          [Meta]
          [DefaultValue("")]
          [NotifyParentProperty(true)]
          [Description("TriggerEvent's control")]
          public virtual string TriggerControl
          {
              get
              {
                  return this.State.Get<string>("TriggerControl", "");
              }
              set
              {
                  this.State.Set("TriggerControl", value);
              }
          }
  
          /// <summary>
          /// Reload content on each show event.
          /// </summary>
          [ConfigOption]
          [Meta]
          [DefaultValue(false)]
          [NotifyParentProperty(true)]
          [Description("Reload content on each show event.")]
          public virtual bool ReloadOnEvent
          {
              get
              {
                  return this.State.Get<bool>("ReloadOnEvent", false);
              }
              set
              {
                  this.State.Set("ReloadOnEvent", value);
              }
          }
  
          /// <summary>
          /// True to monitor complete state of the iframe instead load event using.
          /// </summary>
          [ConfigOption]
          [Meta]
          [Category("Config Options")]
          [DefaultValue(false)]
          [NotifyParentProperty(true)]
          [Description("True to monitor complete state of the iframe instead load event using.")]
          public virtual bool MonitorComplete
          {
              get
              {
                  return this.State.Get<bool>("MonitorComplete", false);
              }
              set
              {
                  this.State.Set("MonitorComplete", value);
              }
          }
  
          /// <summary>
          /// 
          /// </summary>
          [DefaultValue("")]
          [Meta]
          [NotifyParentProperty(true)]
          [Description("")]
          public virtual string Callback
          {
              get
              {
  
gt:                 return this.State.Get<string>("Callback", "");