Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Custom Render event does not fire???

  1. #11
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1382
      0  

    Default

    I need more than 24 hours in one day I try to blog when I have time but time is hard to come by.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

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

  2. #12
    Sencha User
    Join Date
    Sep 2010
    Posts
    89
    Vote Rating
    0
      0  

    Default

    yea, i wish you have more than 24 hours a day too and no other life

    one more question, in most of the above samples, for example:

    listeners : {
    single : true,
    render : someFunction
    }

    what does the config mean?
    single: true

    I tried to find it in the massive api. somehow did not find it.

    thanks

  3. #13
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1382
      0  

    Default

    For performance if an event only fires once or you only want it to fire once then you add the single : true event option. This will remove the listener after the first firing otherwise you will have a hanging listener that will never fire again.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

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

  4. #14
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,856
    Vote Rating
    88
      0  

    Default

    Quote Originally Posted by xun View Post
    yea, i wish you have more than 24 hours a day too and no other life

    one more question, in most of the above samples, for example:

    listeners : {
    single : true,
    render : someFunction
    }

    what does the config mean?
    single: true

    I tried to find it in the massive api. somehow did not find it.

    thanks
    http://docs.sencha.com/ext-js/4-0/#!...nent-method-on
    Longtime Sencha engineer. Now surplus to requirements apparently...

  5. #15
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,742
    Vote Rating
    258
      0  

    Default

    Quote Originally Posted by xun View Post
    The render event.

    If you run the dummy component, the render event did not fire.

    Thanks for the reply
    Just to clarify, the example code actually overrides the "render" method and does not pass along the arguments to the base class.

    The component does not get rendered automatically - this has to be requested. Either with a "renderTo" config or by calling "render". So, while the example creates the component, it does not render it.

    Lastly, the "render" method has undergone some changes in 4.1. See http://www.sencha.com/forum/showthre...29-API-Changes for details. If you have components that override the "render" method like this, and if those components are in a container, their "render" method will no longer be called. This is explained in the link, but is a result of bulk rendering.

    If you listen to the "render" event as Mitchell describes, this will work very similarly to 4.0. The bug Mitchell describes for the "render" event in 4.1 beta is specific to MVC.
    Don Griffin

    "Use the source, Luke!"

  6. #16
    Sencha User
    Join Date
    Sep 2010
    Posts
    89
    Vote Rating
    0
      0  

    Default

    thanks, that explains it.

Page 2 of 2 FirstFirst 12

Posting Permissions

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