Skip to content

Instantly share code, notes, and snippets.

@js1972
Created December 1, 2014 06:39
Show Gist options
  • Save js1972/b69014e0ef9fd1bc4444 to your computer and use it in GitHub Desktop.
Save js1972/b69014e0ef9fd1bc4444 to your computer and use it in GitHub Desktop.
Help functions to determine if a given control is an XML View and to find the XML View that a control is in...
isXMLView = function(oControl) {
return oControl.getMetadata().getName() === "sap.ui.core.mvc.XMLView";
}
myView = function(oControl) {
return isXMLView(oControl) ? oControl : myView(oControl.getParent());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment