开发者

ExtJS null 'id'

开发者 https://www.devze.com 2023-03-31 08:33 出处:网络
I have this code Ext.create(\'Ext.panel.Panel\', { width: \'100%\', autoScroll: true, height: \'100%\', renderTo: Ext.getBody(),

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

精彩评论

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

关注公众号