1. #1
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    London, UK
    Posts
    32
    Vote Rating
    1
    markofsine is on a distinguished road

      0  

    Default How to override 'extend' property or suggestions on different approach

    How to override 'extend' property or suggestions on different approach


    In my app I have extended the Ext.grid.Panel (e.g MyApp.ux.grid.Panel) and added a fair amount of customization that I use/want to use across the majority of the grid panels in my application (currently 30+ grid views).

    The problems are as follows:
    1. In a major portion of my app I want to extend/override the Ext.grid.Panel and use my enhancements.
    -- Not using designer, I would directly extend from my new component (MyApp.ux.grid.Panel) and continue from there.
    -- Using designer I cannot do this and I overriding the 'extend' property in the override class does not work.

    2. Alternatively, creating an overarching override for the Ext.grid.Panel could work but unfortunately I do not want the enhancements in every single grid panel.
    -- So how do I instantiate the original Ext.grid.Panel without the enhancements.

    This is just one example, but we are heading to the point that we are adding customizations to a number of the base classes (e.g. Store, Model) and the above problems will apply in all these cases.

    I am open to suggestions on alternative best-practice patterns to use...

    Thanks.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Looking forward, this will be solved by the ability to integrate 3rd party components, such as MyApp.ux.grid.Panel.

    Once your custom grid panel is in the toolbox, then dragging it out you will create subclasses of it.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    London, UK
    Posts
    32
    Vote Rating
    1
    markofsine is on a distinguished road

      0  

    Default


    Hi,
    When will this functionality be added?

    In the mean time how do I go about sub-classing Ext.grid.Panel (for example), for use via the designer.

    Or alternatively Overriding Ext.grid.Panel, but being able to use the un-overridden class when needed?

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    This is essentially the same question as your other thread...
    http://www.sencha.com/forum/showthre...gner-overrides
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1