i am working in extjs+ Yii framework. I have view as- QbQns.js-
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', } ] });
On this submit button click, i want to create new view as-
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
So how to call this above view from controller on submit button click. Please suggest me...