Results 1 to 5 of 5

Thread: Adding a Panel to a page

  1. #1

    Default Adding a Panel to a page

    I am trying to add a Panel to a page, but am having problems with the default x-type being undefined. The current code is:

    Code:
     
    var
    
    ct =new Ext.Panel({
    renderTo:'bindform',
    frame:true,
    title:'Book List',
    width:540,
    height:400,
    layout:'fit',
    items: {
    id:'detailPanel',
    region:'center', bodyStyle:{
    background:'#aaaaaa',
    padding:'7px'
    }, html:'Please select a User'
    }
    })
    With this code I get the
    Code:
    types[config.xtype || defaultType] is not a constructor
    error.

    So I guess I am missing a pre-requisite step to adding the Panel. How would I go about doing this?

    Thanks
    Kumar

  2. #2
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    481

    Default

    region:'center' is only for border layout. Try removing it.

  3. #3

    Default

    Quote Originally Posted by elishnevsky View Post
    region:'center' is only for border layout. Try removing it.
    Same error after removing it.

  4. #4
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    481

    Default

    Works fine for me. The problem is somewhere else in your code.

  5. #5

    Default

    Quote Originally Posted by elishnevsky View Post
    Works fine for me. The problem is somewhere else in your code.
    I have a grid already rendered on the page when I am trying to do that. I guess that is causing a problem.

Posting Permissions

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