deanoj
28 May 2008, 6:56 AM
Hi All
I'm looking for the opinions of more experienced Ext developers out there.
At the moment, I have a form panel which might have 10 combos on it. Each combo hass a fair bit of manual configuration but it is consistent. So in this case I extended the ComboBox class to my own, with the configuration in my new component.
Is this the correct use of extend?
What about making the entire panel into a component, which I can easily use with something along the lines of:
myObj = new Ext.ux.CustomPanel({
// override some default config...
Which would provide me with the panel, complete with form elements and buttons etc...
Basically the application we are building here with Ext will eventually have several 'frontends' which are basically the same components with some minor differences (such as title, templates).
It would be nice to avoid having to duplicate code that is 99% the same for the sake of a couple of lines of code.
How have other people approached this?
Animal: You seem to have posted a few times on similar topics I would like to know what you think.
Best regards - Deano
I'm looking for the opinions of more experienced Ext developers out there.
At the moment, I have a form panel which might have 10 combos on it. Each combo hass a fair bit of manual configuration but it is consistent. So in this case I extended the ComboBox class to my own, with the configuration in my new component.
Is this the correct use of extend?
What about making the entire panel into a component, which I can easily use with something along the lines of:
myObj = new Ext.ux.CustomPanel({
// override some default config...
Which would provide me with the panel, complete with form elements and buttons etc...
Basically the application we are building here with Ext will eventually have several 'frontends' which are basically the same components with some minor differences (such as title, templates).
It would be nice to avoid having to duplicate code that is 99% the same for the sake of a couple of lines of code.
How have other people approached this?
Animal: You seem to have posted a few times on similar topics I would like to know what you think.
Best regards - Deano