Skip to content

Instantly share code, notes, and snippets.

@edchat
Created June 19, 2014 15:30
Show Gist options
  • Save edchat/18c9b25eef34f2be217b to your computer and use it in GitHub Desktop.
Save edchat/18c9b25eef34f2be217b to your computer and use it in GitHub Desktop.
dojox/app getViewFromViewId Function
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