Skip to content

Instantly share code, notes, and snippets.

@dfenerski
Created April 9, 2022 11:26
Show Gist options
  • Save dfenerski/28814059c3a7b000f4ad24b99a09034b to your computer and use it in GitHub Desktop.
Save dfenerski/28814059c3a7b000f4ad24b99a09034b to your computer and use it in GitHub Desktop.
Global XMLPreprocessor for UI5 apps
registerXMLPreprocessor: function () {
// Views that use templating must add xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
const oLocal = this.getModel('local');
XMLView.registerPreprocessor(
'XML',
'sap.ui.core.util.XMLPreprocessor',
'XML',
false,
false,
{
models: {
local: oLocal,
},
},
);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment