1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    15
    Vote Rating
    0
    byannick is on a distinguished road

      0  

    Question missing : after property id

    missing : after property id


    Hi all,

    I code a app with extjs and i've got this error: missing : after property id

    full code :
    Code:
    Ext.onReady(function(){
        var viewport = new Ext.Viewport({
            layout: 'border',
            renderTo: Ext.getBody(),
            items: [{
                region: 'north',
                xtype: 'toolbar',
                height: 32,
                items: [{
                    xtype: 'tbbutton',
                    text: 'Entreprises'
                },{
                    xtype: 'tbseparator'
                },{
                    xtype: 'tbbutton',
                    text: 'Clientèles'
                },{
                    xtype: 'tbseparator'
                },{
                    xtype: 'tbbutton',
                    text: 'Projets'
                },{
                    xtype: 'tbfill'
                }, {
                    xtype: 'tbbutton',
                    text: 'Ma session'
                }]
            }, {
                region: 'west',
                xtype: 'panel',
                split: true,
                collapsible: true,
                collapseMode: 'mini',
                width: 200,
                minSize: 200,
                html: 'west'
            }, {
                region: 'center',
                xtype: 'panel',
                items: [{
                    var grid = new Ext.grid.GridPanel({
                        renderTo: Ext.getBody(),
                        width: 'auto',
                        height: 'auto',
                        frame: true
                    });
                }]
            }, {
                region: 'east',
                xtype: 'panel',
                split: true,
                collapsible: true,
                collapseMode: 'mini',
                width: 200,
                minSize: 200,
                html: 'east'
            }, {
                region: 'south',
                split: true,
                height: 100,
                minHeight: 100,
                collapseMode: 'mini',
                xtype: 'panel',
                html: 'south',
            }]
        });
    });
    the error of line is:

    var grid = new Ext.grid.GridPanel({ line 49.

    I don't understand this error, can you help me?

    Scuse my bad english :-)

    See you

  2. #2
    Sencha User
    Join Date
    May 2010
    Location
    Jakarta - Indonesia
    Posts
    169
    Vote Rating
    0
    yagi is on a distinguished road

      0  

    Default


    I think you should remove '{}' inside the items.

    Like this:
    Code:
    items: [
                    var grid = new Ext.grid.GridPanel({
                        renderTo: Ext.getBody(),
                        width: 'auto',
                        height: 'auto',
                        frame: true
                    });
                ]
    Berusaha dan Berdoa

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    1. This is overnested.
    2. This is still not valid javascript.

    You should use:
    Code:
    var grid;
    var viewport = new Ext.Viewport({
      layout: 'border',
      ...
      items: [{
        region: 'north',
        ...
      }, {
        region: 'west',
        ...
      }, grid = new Ext.grid.GridPanel({
        region: 'center',
        ...
      }), {
        region: 'east',
        ...
      }, {
        region: 'south',
        ...
      }]
    });

  4. #4
    Ext User
    Join Date
    Aug 2010
    Posts
    15
    Vote Rating
    0
    byannick is on a distinguished road

      0  

    Default


    the reaction of the application is not normal, can you try to run your house and tell me if your home page also has a similar panel, but to see the rest you must click on the arrow on the top of collapsible Left?

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    I don't understand the question. Can you rephrase it?

    Also, is this when using my example?

  6. #6
    Ext User
    Join Date
    Aug 2010
    Posts
    15
    Vote Rating
    0
    byannick is on a distinguished road

      0  

    Default


    all regions are superimposed on the top left. that
    which is above all, the region is a
    Collapsible property. So when I reduced
    Regions are recovering in the right place. but not
    completely: the western region appears to become "invisible" and
    at the center, where I have my grid, I would normally
    have a white box. but it remains blue as if it
    there was not this grid.

    Hope to be clearer thanks to google translation: -
    )

    PS: I invite you to put my script in an html page with you for you to see the result.

  7. #7
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    This works without problems:
    Code:
    var grid;
    var viewport = new Ext.Viewport({
        layout: 'border',
        items: [{
            region: 'north',
            xtype: 'toolbar',
            height: 32,
            items: [{
                text: 'Entreprises'
            }, '-',
            {
                text: 'Clientèles'
            }, '-',
            {
                text: 'Projets'
            }, '->',
            {
                text: 'Ma session'
            }]
        },
        {
            region: 'west',
            xtype: 'panel',
            split: true,
            collapsible: true,
            collapseMode: 'mini',
            width: 200,
            minSize: 200,
            html: 'west'
        },
        grid = new Ext.grid.GridPanel({
            region: 'center',
            store: [
                [1, 'One'],
                [2, 'Two'],
                [3, 'Three']
            ],
            columns: [{
                header: 'Number',
                dataIndex: 'field1'
            },
            {
                header: 'Name',
                dataIndex: 'field2'
            }]
        }),
        {
            region: 'east',
            xtype: 'panel',
            split: true,
            collapsible: true,
            collapseMode: 'mini',
            width: 200,
            minSize: 200,
            html: 'east'
        },
        {
            region: 'south',
            split: true,
            height: 100,
            minHeight: 100,
            collapseMode: 'mini',
            xtype: 'panel',
            html: 'south'
        }]
    });

  8. #8
    Ext User
    Join Date
    Aug 2010
    Posts
    15
    Vote Rating
    0
    byannick is on a distinguished road

      0  

    Default


    Nice, thanks !

Similar Threads

  1. missing } after property list
    By fangzhouxing in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 30 Jan 2010, 3:00 AM
  2. missing } after property list
    By soursurfer in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 21 Jan 2010, 6:05 PM
  3. if = missing : after property id
    By MacJK in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 23 Jul 2009, 9:15 AM
  4. missing : after property id
    By Priyank014 in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 28 Jul 2008, 2:09 AM
  5. missing : after property id
    By webdings in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 13 Feb 2008, 6:14 PM

Thread Participants: 2