Results 1 to 2 of 2

Thread: Add Event Listener to Component Before it is Rendered?

  1. #1
    Sencha User
    Join Date
    Dec 2010

    Default Add Event Listener to Component Before it is Rendered?

    Hey all, I'm hoping someone can help me think outside of the box here. I have to attach an event listener to an Ext component the least invasive way possible. Basically we have have a COTS product which uses Ext 3.4 and I don't want to muck with the code unless I have to. I'd rather just add a script include to the page which will execute once the page is rendered. The code adds a 'load' listener to a store by getting the Ext component using Ext.getCmp. The problem is the component isn't created until a button is clicked by the user and even then it's rendered a few milliseconds after that. Any way I can 'wait' (not synchronously, or course) for the component to be rendered and then once it's available attach my listener? The only think I could come up with is attaching a listener to the button, but even then I suspect there would be a timing discrepancy between when that is fired and when the component is actually available.

    Thanks in advance!

  2. #2
    Sencha User
    Join Date
    Nov 2014


    Hi robhyx--

    Can you add a render event listener to your component, and do whatever processing you need to do there?


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