Friday, 15 July 2011

extjs - Passing parameters from a deftjs controller to another -



extjs - Passing parameters from a deftjs controller to another -

i'm using deftjs´s viewcontrollers, , had pass variables controller another.

how best way, since create view , not controller?

my actual solution is:

in controller 1:

var me = this; var win = ext.create('app.view.car.window'); win.getcontroller().setbrandid(me.brandid); win.getcontroller().setcolorid(me.colorid); win.show();

and controller auto view:

ext.define('app.controller.car.windowcontroller', { extend: 'deft.mvc.viewcontroller', config: { brandid: null, colorid: null }, ....

thanks,

the solution question this:

var win = ext.create('app.view.car.window' { controllerconfig: { brandid: me.brandid, colorid: me.colorid }); win.show();

controllerconfig section of configuration pass normal config controller.

extjs deftjs

No comments:

Post a Comment