我正在使用extjs + Yii框架。我有看法原樣 QbQns.js-如何在extjs中調用按鈕單擊事件中的視圖
Ext.define('Balaee.view.qb.qbqns.Qbqns',
{
extend:'Ext.form.Panel',
requires:[
'Balaee.view.qb.qbqns.QbqnsView'
],
id:'qbqnsId',
alias:'widget.Qbqns',
title:'Qbqns',
height:500,
items:[
{ xtype:'QbqnsView',},
],//end of items square
buttons:[
{ xtype:'button',
fieldLabel:'Vote',
action:'voteAction',
name:'vote',
formBind:true,
text:'submit', } ] });
在此提交按鈕點擊,我想創建新的視圖原樣
Ext.define('Balaee.view.qb.qbqns.QbqnsReviewView',
{
extend:'Ext.view.View',
id:'qbqnsViewId',
alias:'widget.QbqnsReviewView',
//store:'kp.PollStore',
store:'qb.QbqnsStore',
config:
{
tpl:'<tpl for=".">'+
'<div id="main">'+
'</br>'+
'<h1 id="q">Question :-</h1> {question}</br>'+
/* '<tpl for="options">'+ // interrogate the kids property within the data
'<p>  <input type="radio" name="{parent.questionId}" value="{option}"> {option}</p>'+
'</tpl>'+*/
'<tpl for="options">'+
'<tpl if="parent.Correctoption==option">'+
//'<tpl if="Correctoption==UsersOption">'+
'<p style="color:Green"><input type="radio" name="{optionId}">{option}</p>'+
'<tpl elseif="parent.UsersOption==option">'+
'<p style="color:Red"><input type="radio" name="{optionId}">{option}</p>'+
'<tpl else>'+
'<p><input type="radio" name="{parent.questionId}" value="{option}"> {option}</p>'+
'</tpl>'+
'</tpl>'+
'<p>---------------------------------------------------------</p>'+
'</div>'+
'<h1 id="q">Total marks are:-</h1>{Total}'+
'<h1 id="q">Score you got is:-</h1>{Score}'+
'</tpl>',
itemSelector:'div.main',
}
});// End of login class
那麼如何調用從控制器上提交按鈕此上述觀點單擊。請給我建議...
有人可以請指導我 – user2077845 2013-02-19 06:31:50