Created
June 19, 2014 15:30
-
-
Save edchat/18c9b25eef34f2be217b to your computer and use it in GitHub Desktop.
dojox/app getViewFromViewId Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getViewFromViewId: function (app, viewId) { | |
if (viewId) { | |
var parts = viewId.split("_"); | |
parts.shift(); // remove app from parts | |
var view = app; | |
var nextChildId = app.id + "_"; | |
for (var item in parts) { | |
var childId = nextChildId + parts[item]; | |
view = view.children[childId]; | |
nextChildId = childId + "_"; | |
} | |
return view; | |
} | |
return null; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment