【发布时间】:2011-09-13 14:18:09
【问题描述】:
我想我的问题很基本,但无论如何我都需要帮助.. 问题是.. 我有一个带有 5 张卡片(即面板)的旋转木马,在这个面板内我想调用其他相同的面板全部5张卡..
为了举例说明我的意思,这里有一些代码示例:
//Here I'm creating the panel
this.testeCard();
MYPROJ.UI.prototype.testeCard = function(){
var teste = new Ext.Panel({
html: 'teste teste teste',
style: 'background-color: #2f7da8'
});
this._registerView(teste,'teste');
return teste;
};
//Here I'm calling it
MYPROJ.UI.prototype.currentCard = function(){
var currentCard = new Ext.Panel({
id: 'currentCard',
cls: 'mainPanel',
//html: 'currentCard',
items:[
this.getView('teste') //Fine here
]
});
this._registerView(currentCard, 'currentCard');
return currentCard;
};
MYPROJ.UI.prototype.anotherCard = function(){
var currentCard = new Ext.Panel({
id: 'currentCard',
cls: 'mainPanel',
//html: 'currentCard',
items:[
this.getView('teste')
]
});
this._registerView(currentCard, 'currentCard');
return currentCard;
};
所以,我想做的是在“currentCard”和“anotherCard”中都调用这张“teste”卡
我该怎么做????
【问题讨论】:
标签: sencha-touch panel extjs carousel