0% found this document useful (0 votes)
10 views1 page

Compiling Declarative HTML 91f1454

The document discusses compiling declarative HTML in OpenUI5. It provides an example of calling the sap.ui.core.plugin.DeclarativeSupport.compile method to dynamically compile controls defined as declarative markup that is loaded and added to the DOM. The method is called on a <div> container with a child <div> defining a Button control via data attributes.

Uploaded by

zzg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Compiling Declarative HTML 91f1454

The document discusses compiling declarative HTML in OpenUI5. It provides an example of calling the sap.ui.core.plugin.DeclarativeSupport.compile method to dynamically compile controls defined as declarative markup that is loaded and added to the DOM. The method is called on a <div> container with a child <div> defining a Button control via data attributes.

Uploaded by

zzg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

loio

91f1454b6f4d1014b6dd926db0e91070
view on: demo kit nightly build | demo kit latest release

Compiling Declarative HTML


OpenUI5 provides a plugin for controls that are defined as declarative markup on startup
time.
To compile the declarative UI markup deferred, for example, when the markup is
dynamically loaded and added to the DOM you can call the
sap.ui.core.plugin.DeclarativeSupport.compile method, see the following code
snippet:
<div id="button">
<div data-sap-ui-type="sap.m.Button" data-text="This button is added
dynamically"></div>
</div>

<script>

sap.ui.core.plugin.DeclarativeSupport.compile(document.getElementById("button
"));
</script>

You might also like