Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Jun 2010
    Posts
    4
    Vote Rating
    0
    ultrasaurus is on a distinguished road

      0  

    Default [CLOSED]panels disappear when fullscreen:false

    [CLOSED]panels disappear when fullscreen:false


    Is it a bug or some strange feature which I don't understand that causes panels to disappear when fullscreen is false.

    With this code I see a blank page:
    Code:
    Ext.setup({
            onReady: function() {
                new Ext.Panel({
                    id: 'mainscreen',
                    html: 'This is some text in a panel. <br /><small>This is smaller text.</small>',
                });
        }
    });
    With this code I see the text I expect:
    Code:
    Ext.setup({
            onReady: function() {
                new Ext.Panel({
                    id: 'mainscreen',
                    html: 'This is some text in a panel. <br /><small>This is smaller text.</small>',
                    fullscreen:true
                });
    
               
        }
    });


    What up?

    Thanks,
    Sarah

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,050
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Fullscreen components automatically show themselves, you need to either:

    a) explicitly call show
    b) render it to an element

    If they aren't.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Jun 2010
    Posts
    4
    Vote Rating
    0
    ultrasaurus is on a distinguished road

      0  

    Default on showing panels

    on showing panels


    1) If hidden is false by default, why must I call show?
    2) what does it mean to "render it to an element" ? Can you specify what the code would look like for that?

    Thanks for your quick response,
    Sarah

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,050
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    fullscreen true automatically renders it to the document body. If not, the component isn't rendered until you call either render, or show.

    All components have to be rendered somewhere in the DOM, so you can specify a particular element, or you can just call show(), which will render to the document body if you haven't specified anywhere to render it to.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Ext User
    Join Date
    Jun 2010
    Posts
    4
    Vote Rating
    0
    ultrasaurus is on a distinguished road

      0  

    Default


    Sorry to appear dimwitted, but I'm not getting it. I tried this:

    Code:
    Ext.setup({
            onReady: function() {
                var mypanel = new Ext.Panel({
                    id: 'mainscreen',
                    html: 'This is some text in a panel. <br /><small>This is smaller text.</small>'
                });
                mypanel.render();
    
               
        }
    });
    and got this error:
    TypeError: Result of expression 'el' [null] is not an object.

    However, this code worked:
    Code:
    Ext.setup({
            onReady: function() {
                var mypanel = new Ext.Panel({
                    id: 'mainscreen',
                    html: 'This is some text in a panel. <br /><small>This is smaller text.</small>'
                });
                mypanel.show();
    
               
        }
    });
    What exactly does render do, when would i use it and how is it used correctly (since the above code is clearly wrong)?

    Thanks,
    Sarah

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,050
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Render expects an element as the first parameter, however it's more common to use:

    Code:
    new Foo({
        renderTo: 'el'
    });
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #7
    Ext User
    Join Date
    Jun 2010
    Posts
    4
    Vote Rating
    0
    ultrasaurus is on a distinguished road

      0  

    Default renderTo: 'el'

    renderTo: 'el'


    Quote Originally Posted by evant View Post
    Render expects an element as the first parameter, however it's more common to use:

    Code:
    new Foo({
        renderTo: 'el'
    });
    Ok, I like that shortcut.

    One more thing... what is 'el' ?

    Thanks,
    Sarah

  8. #8
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,050
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Either

    a) The id of an element
    b) A dom element reference
    c) An Ext.Element reference
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Similar Threads

  1. Replies: 4
    Last Post: 11 Mar 2011, 8:21 PM
  2. panel.remove(item,false) => item does not disappear
    By maho2nd in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 14 Jan 2010, 3:54 AM
  3. Replies: 4
    Last Post: 19 Mar 2009, 5:53 PM
  4. Replies: 7
    Last Post: 29 Apr 2008, 2:49 PM
  5. [Solved]tabpanel autodestroy false and readding panels
    By cocorossello in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 24 Jan 2008, 4:55 AM

Thread Participants: 1