[CLOSED] Tab Panel loading synchronization

Page 3 of 4 FirstFirst 1234 LastLast
  1. #21
    Quote Originally Posted by Daniil View Post
    Well, it can be called anywhere after ExtJS resources scripts.

    Generally, I meant to call it within an Update listener. As an attempt to avoid a scenario when Ext.ComponentMgr.all.length is 0.
    Yeah, I tried that approach in hope to overcome the invalid object count. However, without setting a delay, Ext.ComponentMgr.all.length continues to report zero even if Ext.onReady() is placed inside the Update listener.
  2. #22
    Just in Ext.NET v2 the onReady scripts are executed according the queue they are registered. I though it works the same in Ext.NET v1. Never mind.

    Then I would try with Delay="1" ("1" should be enough) for the Update listener. It should cause the main Ext.onReady script will be executed before the listener and all components should be registered in Ext.ComponentMgr.
    Last edited by Daniil; Aug 23, 2012 at 2:45 PM.
  3. #23
    Quote Originally Posted by Daniil View Post
    Just in Ext.NET v2 the onReady scripts are executed according the queue they are registered. I though it works the same in Ext.NET v1. Never mind.

    Then I would try with Delay="1" ("1" should be enough) for the Update listener. It should cause the main Ext.onReady script will be executed before the listener and all components should be registered in Ext.ComponentMgr.
    This appears to be working well in IE9 and FireFox 14. It doesn't work in IE8. Maybe, the delay of 1 is not sufficient. I don't feel comfortable having to rely on timed-out actions here but it looks more and more like we're running out of options. Hopefully, my paradigm will work well enough most of the time.
  4. #24
    Yes, I always try to avoid any delays if possible.

    If you will be able to provide a sample to reproduce the issue, we would do our best to investigate a possibility to avoid the delay.
  5. #25
    Where does ResourceManager logically place a script registered on the server by means of RegisterAfterClientInitScript method? I've noticed that it gets appended to the Ext.net.ResourceMgr.init() stack, so would it be fair to state that it always gets executed when the document is loaded the first time?
  6. #26
    Quote Originally Posted by vadym.f View Post
    Where does ResourceManager logically place a script registered on the server by means of RegisterAfterClientInitScript method?
    To the end of the function passed to Ext.onReady.

    Example
    this.ResourceManager1.RegisterAfterClientInitScript("alert('RegisterAfterClientInitScript');");
    Ext.onReady(function () {
        // the script generated by markup and code behind
        alert('RegisterAfterClientInitScript');
    });
    Quote Originally Posted by vadym.f View Post
    I've noticed that it gets appended to the Ext.net.ResourceMgr.init() stack
    Ext.net.ResourceMgr.init() call is separate. You could look at the Page Sources to check that.

    Quote Originally Posted by vadym.f View Post
    so would it be fair to state that it always gets executed when the document is loaded the first time?
    Yes, any script registered by the RegisterAfterClientInitScript method will get always executed on first load.
  7. #27
    Thanks for clarification! What would be the correct call on the server that would register a script on a page level similar in timing to that of BeforeUpdate event handler? Is it RegisterBeforeClientInitScript?
  8. #28
    Where? On the page which is loaded? Or on the page which initiates a load request?
  9. #29
    Quote Originally Posted by Daniil View Post
    Where? On the page which is loaded? Or on the page which initiates a load request?
    On the page that is loaded.
  10. #30
    Well, this page does know nothing about an BeforeUpdate listener of its loader.

    I think you could try to use the RegisterAfterClientInitScript method or DocumentReady for your needs.
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. [CLOSED] Desktop Windows synchronization best approach
    By FAS in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 23, 2011, 6:17 PM
  2. Tab Panel Content Loading
    By xMAC in forum 1.x Help
    Replies: 5
    Last Post: Dec 10, 2010, 7:07 AM
  3. Deferred loading of Panel
    By lionelhutz in forum 1.x Help
    Replies: 0
    Last Post: Oct 09, 2009, 8:40 AM
  4. ext:Panel, Icon isn't loading
    By flaviodamaia in forum 1.x Help
    Replies: 4
    Last Post: Aug 07, 2009, 10:15 AM
  5. Replies: 0
    Last Post: May 27, 2009, 6:50 AM

Posting Permissions