0
這裏的情況是工作:煎茶按鈕沒有從index.html的
當用戶打開我的應用程序他已經登錄,它的工作。當他將應用程序置於後臺模式時,我想在他回來時再次顯示我的身份驗證視圖。所以在我的index.html我在做我的頭以下部分:
<script type="text/javascript" charset="utf-8">
function onActive() {
setTimeout(function() {
Ext.getCmp('mainView').destroy();
Ext.Viewport.add(Ext.create('MyApp.view.Authentication'));
}, 0);
}
</script>
我的認證視圖顯示,但如果我把我的確認按鈕沒有發生(而它的工作原理,當它是國內首家推出)。 這裏是我的按鈕:
{
xtype: 'button',
text: 'Valider:',
width: '150px',
//margin: 2,
cls:'AuthFieldset',
name: 'authent_validateButtonName',
id: 'authent_validateButton'
}
這裏是我的控制器:
config: {
refs: {
btnValidate: '#authent_validateButton',
},
control: {
btnValidate : {
tap : 'doAuthentication'
}
},
},
doAuthentication : function(){
alert('you\'ve been authenticated'); //the alert does not appear the second time
}
我真的不明白!也許我的按鈕不能從我的index.html中知道doAuthentication?這就像我的看法是不綁定到我的控制器了... 感謝您的幫助