Quote Originally Posted by zouzhijun View Post
Architect is functional for big app development now, but I found that Ext's localization support is not so good
Instantiate the views from "owning" controller and use some sort of localizer like the one I posted here a few weeks ago.

For example, from a event on some controller (button click) you normally instantiate the view the show it:

PHP Code:
onButtonClick: function(button) {
// Call Localizer...

But imagine that you have to instantiate the same window from different places over the whole application. Worst, you need to set some values (current employee, secutiry constraints, etc.) at view ir controller level before view is shown. You copy over and over the same code.

So the best practice (at least for me) is to instantiate the view from the controller:

PHP Code:
onButtonClick: function(button) {

PHP Code:
show: function(someParams...) {
me thiswin Ext.widget("somewindow");
// Set up win/controller accorting to operational params and/or context
// Localize the window
// Show

I just figure out this way of doing things and, not much a surprise, someone in stackoverflow suggested this way back in november!