Aug 31, 2009, 3:49 AM
Creating a composite server-side/client-side Control based on Coolite/ExtJs
I always marvel at how Coolite team has successfully managed the constraints of both server-side ASP.NET & client-side ExtJs while providing seamless integration between them on both the server & client.
Well, I like to build reusable server-side composite controls. I have successfully created many complex composite controls, but I having a problem while creating Composite controls using Coolite.
The major reason is I want to create a composite controls, that should have class say MyCooliteControl both on the server and the client (like Coolite.Ext.Web.TextField & Ext.form.TextField).
I want to add Coolite controls (say Store, Panel & GridPanel together) as children of the composite server-side control. So, when this control renders on client, the client-side class' object is created that I should be able to access through Ext.getCmp().
Both the server-side & Client-side control should expose the Store, GridPanel etc. as its properties. I also want to add events on my composite client-side control.
I think the Coolite team should have an idea what I am trying to accompolish. Although I am not a master as ExtJs as yet (although I understand Coolite's working more closely), I have studied various options including creating a Plugin, extending an ExtJs class on client or Coolite class on server.
However, I have not been able to imagine which class should I extend & where (on client or on server)?
I would be obliged if Coolite team can post a working example of a composite Server control having Coolite controls as its children. Also, this server-control should also have a corresponding client control exposing the members specified as children on the server, with the client control being accessible as:
Well, I like to build reusable server-side composite controls. I have successfully created many complex composite controls, but I having a problem while creating Composite controls using Coolite.
The major reason is I want to create a composite controls, that should have class say MyCooliteControl both on the server and the client (like Coolite.Ext.Web.TextField & Ext.form.TextField).
I want to add Coolite controls (say Store, Panel & GridPanel together) as children of the composite server-side control. So, when this control renders on client, the client-side class' object is created that I should be able to access through Ext.getCmp().
Both the server-side & Client-side control should expose the Store, GridPanel etc. as its properties. I also want to add events on my composite client-side control.
I think the Coolite team should have an idea what I am trying to accompolish. Although I am not a master as ExtJs as yet (although I understand Coolite's working more closely), I have studied various options including creating a Plugin, extending an ExtJs class on client or Coolite class on server.
However, I have not been able to imagine which class should I extend & where (on client or on server)?
I would be obliged if Coolite team can post a working example of a composite Server control having Coolite controls as its children. Also, this server-control should also have a corresponding client control exposing the members specified as children on the server, with the client control being accessible as:
Ext.getCmp('<%= Me.ServerControlID.ClientID %>');
Last edited by geoffrey.mcgill; Feb 20, 2011 at 12:29 PM.
Reason: please use [CODE] tags