PDA

View Full Version : Getting a list of active views for controller action



alane
29 Aug 2012, 12:09 PM
I want to trigger an action where I get a list of all currently shown views and hide them before taking another action.

Is there a way to get this list, or a 'hide all' function I can use?

alane
29 Aug 2012, 3:44 PM
for all those out there in my (extremely) newbie state, here's an answer I came up with.

I'm creating a list of views being used at init called this.views. I found I could loop through that list and tell them all to hide before showing the one I want.


for(var view in this.views) {
this.views[view].hide();
}