mardi 24 février 2015

custom attributes with architect

how do I create the following custom attribute (mnuContext) in my view controller class using architect?

Code:



Ext.define('SolarUI.view.case.CaseViewController', {
extend: 'Ext.app.ViewController',
alias: 'controller.casesCtrl',

.
.
.
.
mnuContext: new Ext.menu.Menu({
items: [{
id: 'do-something',
text: 'Do something'
}],
listeners: {
itemclick: function(item) {
switch (item.id) {
case 'do-something':
break;
}
}
}
}),

showView: function(view) {
.
.
.
.
},



when trying with architect by adding a custom property I get the following mess:

Code:



config: {
mnuContext: 'new Ext.menu.Menu({\n items: [{\n id: \'do-something\',\n text: \'Do something\'\n }],\n listeners: {\n itemclick: function(item) {\n switch (item.id) {\n case \'do-something\':\n break;\n }\n }\n }\n })'
},





custom attributes with architect

Aucun commentaire:

Enregistrer un commentaire