Results 1 to 3 of 3

Thread: rendering to panel body by DOM id

  1. #1

    Default rendering to panel body by DOM id

    I have some third-party javascript library that writes a flash object to a given element. After the panel is loaded I want to display the flash object. Is this the best method:

    ----

    I have a basic extended Ext.Panel with several sub-panels.
    For a given sub-panel, say, this.SubPanel I am interested in the DOM Id of its body:

    this.SubPanel.body.id

    However, I having troubles determining exactly when the body property is available. This property is reported to be undefined in the afterRender, onRender, and show events.

    Thanks,
    Noah

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    It should be available in onRender:

    Code:
    MyClass = Ext.extend(Ext.Panel,
    {
       onRender: function(ct, position)
       {
          MyClass.superclass.onRender.call(this, ct, position);
          alert(this.body);
       }
    }
    );

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    If you want to use media in a Panel, I'd advise using this: http://extjs.com/forum/showthread.php?t=23983

Posting Permissions

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