public static string ToConfig(AbstractComponent component, bool registerResources) { return ComponentLoader.ToConfig(new AbstractComponent[] { component }, registerResources); }
public static string ToConfig(AbstractComponent component) { return component.ToConfig(); }
public virtual void SetActiveGroup(AbstractComponent group) { this.SetActiveGroup(group.ClientID); }
public static void Render(AbstractComponent component, bool registerResources) { CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, registerResources)); }
public virtual void Add(AbstractComponent component) { this.Items.Add(component); }
public virtual void Remove(AbstractComponent component) { this.Call("remove", new JRawValue(component.ClientID)); }
/* Methods * -----------------------------------------------------------------------------------------------*/ /// <summary> /// /// </summary> /// <param name="component"></param> /// <returns></returns> public virtual ItemsBuilder <TParent, TParentBuilder> Add(AbstractComponent component) { this.Owner.Items.Add(component); return(this); }
/// <summary> /// Adds docked item to the panel. /// Note : this method must be used during Ajax request (when the panel instance is created on the client side) /// </summary> /// <param name="component">The AbstractComponent or array of components to add. The components must include a 'dock' parameter on each component to indicate where it should be docked ('top', 'right', 'bottom', 'left').</param> public virtual void AddDocked(AbstractComponent component) { //if (!ExtNet.IsAjaxRequest) //{ // throw new Exception("AddDocked method must be used during ajax request to add dynamic control only"); //} if (component.Dock == Dock.None) { throw new Exception("You have to specify Dock for docked component"); } component.RegisterAllResources = true; component.RegisterScripts(); component.RegisterStyles(); component.PreventRenderTo = true; this.Call("addDocked", component.ToConfig()); }
public static void Render(AbstractComponent component) { CompressionUtils.GZipAndSend(component.ToConfig()); }
public static string ToJson(AbstractComponent component) { return(component.ToConfig()); }
public virtual void SetActiveTab(AbstractComponent item) { this.SetActiveTab(item.ConfigID); }
/// <summary> /// /// </summary> /// <param name="item"></param> protected override void BeforeItemAdd(AbstractComponent item) { base.BeforeItemAdd(item); item.ContentContainer.Attributes.Add("class", "x-hidden"); }
/// <summary> /// Applies the supplied values to the template and appends the new node(s) to el. /// </summary> public virtual TBuilder Append(AbstractComponent target, object data) { this.ToComponent().Append(target, data); return(this as TBuilder); }
/// <summary> /// Brings the specified Component to the front of any other active Components in this ZIndexManager. /// </summary> /// <param name="comp">The id of the Component or a Ext.Component instance</param> public virtual void BringToFront(AbstractComponent comp) { this.BringToFront(comp.ClientID); }
public void Append(AbstractComponent target, object data) { this.ScriptHelper("append", target, data); }
public void InsertFirst(AbstractComponent target, object data) { this.ScriptHelper("insertFirst", target, data); }
/// <summary> /// /// </summary> /// <param name="item"></param> protected virtual void Buttons_AfterItemRemove(AbstractComponent item) { item.RenderXType = true; this.AfterItemRemove(item); }
public void Overwrite(AbstractComponent target, object data) { this.ScriptHelper("overwrite", target, data); }
public virtual void Insert(int index, AbstractComponent component) { this.Call("insert", index, new JRawValue(component.ClientID)); }
protected void ScriptHelper(string name, AbstractComponent target, object data) { this.ScriptHelper(name, "={".ConcatWith(target.ClientID, ".getContentTarget()}"), data); }
protected virtual void BeforeItemAdd(AbstractComponent item) { }
/// <summary> /// Applies the supplied values to the template and overwrites the content of el with the new node(s). /// </summary> public virtual TBuilder Overwrite(AbstractComponent target, object data) { this.ToComponent().Overwrite(target, data); return(this as TBuilder); }
public static string ToConfig(AbstractComponent component) { return ComponentLoader.ToConfig(new AbstractComponent[] { component }, true); }
public virtual void Remove(AbstractComponent component, bool autoDestroy) { this.Call("remove", new JRawValue(component.ClientID), autoDestroy); }
/// <summary> /// Sends the specified Component to the back of other active Components in this ZIndexManager. /// </summary> /// <param name="comp">The id of the Component or a Ext.Component instance</param> public virtual void SendToBack(AbstractComponent comp) { this.SendToBack(comp.ClientID); }
private string ObtenerValoresAtributos(AbstractComponent comp) { string atributo = string.Empty; try { FieldContainer componentes = (FieldContainer)comp; foreach (AbstractComponent com in componentes.Items) { if (typeof(AtributoTexto) == com.GetType()) { TextField cajatexto = (TextField)com; if (!string.IsNullOrEmpty(cajatexto.Text)) { atributo += "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>"; } } else { if (typeof(AtributoEntero) == com.GetType() || typeof(AtributoDecimal) == com.GetType()) { NumberField cajatexto = (NumberField)com; if (!string.IsNullOrEmpty(cajatexto.Text)) { atributo += "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>"; } } else { if (typeof(AtributoFecha) == com.GetType()) { DateField cajatexto = (DateField)com; if (!string.IsNullOrEmpty(cajatexto.Text)) { atributo = "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>"; } } else { if (typeof(AtributoTextArea) == com.GetType()) { TextArea cajatexto = (TextArea)com; if (!string.IsNullOrEmpty(cajatexto.Text)) { atributo = "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>"; } } } } } } return atributo; } catch (Exception ex) { Mensajes.Error("No se pueden copiar los atributos en el detalle."); return ""; } }
private void AfterItemRemove(AbstractComponent item) { var cmp = this.PluginOwner; if (cmp != null) { if (cmp.Controls.Contains(item)) { cmp.Controls.Remove(item); } if (cmp.LazyItems.Contains(item)) { cmp.LazyItems.Remove(item); } } }
/// <summary> /// /// </summary> /// <param name="item"></param> protected virtual void Buttons_AfterItemAdd(AbstractComponent item) { item.RenderXType = !item.XType.Equals("button"); this.AfterItemAdd(item); }
public Element(AbstractComponent el, bool chaining) : this(el) { this.Chaining = chaining; }
void Component_AfterItemAdd(AbstractComponent item) { if (this.PluginOwner != null) { this.PluginOwner.Controls.Add(item); this.PluginOwner.LazyItems.Add(item); } }
public virtual void Add(AbstractComponent component, bool render) { this.Add((component)); if (render) { component.Render(); } }
public virtual void Insert(int index, AbstractComponent component, bool render) { if (render) { component.InsertTo(index, this); } else { this.Call("insert", index, new JRawValue(component.ClientID)); } }
protected void ScriptHelper(string name, AbstractComponent target, object data) { this.ScriptHelper(name, TokenUtils.RawWrap(target.ClientID + ".getContentTarget()"), data); }
protected internal virtual void PluginAdded() { this.pluginOwner = this.ParentComponent; if (!this.RequiredOwnerType.IsAssignableFrom(this.pluginOwner.GetType())) { throw new Exception(this.GetType().Name + " plugin requires " + this.RequiredOwnerType.Name); } }
public static void Render(AbstractComponent component) { CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, true)); }
public virtual void SetActiveTab(AbstractComponent item) { this.SetActiveTab(item.ClientID); }
/// <summary> /// Applies the supplied values to the template and inserts the new node(s) as the first child of el. /// </summary> public virtual TBuilder InsertFirst(AbstractComponent target, object data) { this.ToComponent().InsertFirst(target, data); return(this as TBuilder); }