Reputation: 10404
Is there a way to get the current open window?
In the controller is possible to use this.getView()
to get that controller's relative view.
Since a controller can open any view in the project, I want not just know that controller's view, I want the top open (focused) view.
Upvotes: 0
Views: 633
Reputation: 1797
You need to keep track of all opened windows, preferably their controllers.
this answer might give you some insights.
Upvotes: 0
Reputation: 176
You access a view from it's accompanying controller by using $.getView(). If you want to access an item by id e.g. a TextField with id "myTextField" would be $.myTextField.
If you want to know the current top focused view then you should know that from what your app is doing -- as the controller / view you just opened would be the top most view.
Why do you need to know the top most view?
Upvotes: 1