Results 1 to 3 of 3

Thread: Plugin before init of component

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    57
    Answers
    5

    Default Plugin before init of component

    I have written a plugin and I think its behaviour is what I desire. I am however having trouble modifying the config of the component before it is initilized. This is not the plugins config but the config for hte component I have added the plugin to.

    I moved to a mixin which gives the ability to run before and after methods but I dont think I want a mixin as I would prefer the plugin to be isolated and its method not available directly from the component.

    Is there a way to modify the the config of the component via a plugin. I am actually trying to add a selModel to the component but it could be anything that I modify.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    Unfortunately, plugins are initialized after initComponent which is much later to change the config when the component is being initialized. I'm assuming you want to change the config that is sent to the component before that config is enacted on by the component?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    57
    Answers
    5

    Default

    Yes that is correct. In this case I really just want to add a selection model to the grid via the plugin. If you know of another way to do that inside the plugin I am open to that.

    I have implemented this as a mixin but having the mixin methods implemented on the grid doesn't work that well for me and I ended up prefixing my methods in the mixin with 'mixin' to differentiate them but it looks ugly and doesn't feel correct either.

Similar Threads

  1. Replies: 6
    Last Post: 15 Sep 2015, 7:56 AM
  2. Re-init a plugin when a grid reconfigures
    By Jangla in forum Ext: Q&A
    Replies: 1
    Last Post: 11 May 2015, 7:50 AM
  3. TypeError: plugin.init is not a function
    By oloweczek in forum Ext: Discussion
    Replies: 2
    Last Post: 14 Aug 2014, 12:38 AM
  4. RowEditor plugin.init
    By Stefan F. in forum Ext: Discussion
    Replies: 0
    Last Post: 8 Mar 2011, 8:24 AM
  5. How to init groupHeader plugin after reconfigure gridpanel
    By wguo in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 5 Apr 2010, 5:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •