开发者

ExtJS null 'id'

I have this code

Ext.create('Ext.panel.Panel', {
    width: '100%',
    autoScroll: true,
    height: '100%',
    renderTo: Ext.getBody(),
    title: 'IMAGES',
    items: Ext.create('Ext.view.View', {
        padding: 5,
        store: ImageStore,
        tpl: imageTpl
    })
});

and whenever I click in Panel it gives me an error (debugged in IE)


Webpage error details

User Agent: Mozilla/4.0 etc...

Timestamp: Thu, 25 Aug 2011 21:15:22 UTC

Message: 'id' is null or not a开发者_如何学JAVAn object

Line: 7

Char: 183716

Code: 0

URI: /ext-4.0.1/ext-all.js


and whenever I have a link like <a href="#" onClick="whateverFunction();">Run</a> it fails to run the function...


What does the content of imageTpl look like? Try changing the config name from tpl to itemTpl.


tpl should work ok, depending on what imageTpl looks like. From the code, this is the only thing that looks like it would bomb this.

Ext.panel.Panel height and width take a number, not a string ("100%"). You may also want to use Fit layout on the Panel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜