Suggestion: RenderManager - apiVersion 2
wridgeu opened this issue ยท 2 comments
Hey there ๐
I was wondering if you'd want to add apiVersion 2
of the RenderManager which is avilable since v1.67 of UI5 as seen here.
Didn't want to open up a PR on this before asking, as it could've been intentional to stay "backwards compatible" (especially as it only serves as example/starter code generator).
var ExampleRenderer = {
"apiVersion": 2
};
/**
* Renders the HTML for the given control, using the provided
* {@link sap.ui.core.RenderManager}.
*
* @param {sap.ui.core.RenderManager} oRm
* the RenderManager that can be used for writing to
* the Render-Output-Buffer
* @param {sap.ui.core.Control} oControl
* the control to be rendered
*/
ExampleRenderer.render = function (oRm, oControl) {
oRm.openStart("div", oControl);
oRm.class("sapRULTExample");
oRm.openEnd( );
oRm.write(sap.ui.getCore().getLibraryResourceBundle("<%= librarynamespace %>").getText("ANY_TEXT"));
oRm.writeEscaped(oControl.getText());
oRm.close("div");
};
Best Regards,
Marco
Hi Marco,
Looks like a good idea to me, I'm not really looking at backwards compatibility personally. Looking at the supported versions of UI5 here (https://ui5.sap.com/versionoverview.html), every version below 1.67 goes out of support in 2021. (except for 1.38, but that's not a version I'm looking to keep support for anyway).
At this point the ui5.yaml also contains a version 1.85.x so I don't see a reason why we can't add your suggestion to the generator!
I'm also planning to move the functionality of this generator to the easy-ui5 generator (which uses 1.84 as it's base library version)
Best regards,
Geert-Jan
Merged into main branch!