Aug 03, 2011, 6:57 AM
[CLOSED] Creating a c# component that generates a JavaScript class
Hello:
My message is related to this post: http://forums.ext.net/showthread.php...a-custom-class
I want to do the same but I am fuzzy about how the code generation is done on the client, and I was wondering if you have some samples at this time.
Just to give you an example, I want to develop an ext.net control that would generate this kind of code:
Thanks
My message is related to this post: http://forums.ext.net/showthread.php...a-custom-class
I want to do the same but I am fuzzy about how the code generation is done on the client, and I was wondering if you have some samples at this time.
Just to give you an example, I want to develop an ext.net control that would generate this kind of code:
Ext.ns('MyNameSpace');
MyNameSpace.Controllers.ListController = Ext.extend(Object, {
INSERT: 0,
UPDATE: 1,
NONE: -1,
ui: null,
applicationsStore: null,
getUi: function()
{
if (this.ui == null)
{
this.ui = new Ext.Panel(...) // <- Here I would like to insert some javascript code that is the result of rendering a Panel created in C# code. How would I achieve this?
}
},
// This event gets fired before the onApplicationsStore is refreshed
onApplicationsStoreBeforeLoad: function (store, options)
{
// Disable the add/remove buttons
this.enableOrDisableApplicationsButtons(false);
},
getApplicationsStore: function()
{
if (this.applicationsStore == null)
{
this.applicationsStore = new Ext.data.Store(...) // Same here as above, I would like to insert the code that is generated from the store C# object
}
},
});
My JavaScript controller class is a component that glues the ui and all the actions together.Thanks
Last edited by Daniil; Aug 04, 2011 at 5:11 PM.
Reason: [CLOSED]