Skip to Content
0

How to bind a json data to an html element in sap ui5

May 26, 2017 at 04:54 AM

45

avatar image

Hi There,

I have an Html element in my XML view and want to bind a json data to it, can you pleased advice below is my xml view content.

I am able to bind json data to normal sapui5 elements, just want to check on the native html elements.

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m" xmlns:u="sap.ui.unified" controllerName="com.apple.ui5.upl.controller.Upload"
xmlns:l="sap.ui.layout" xmlns:html="http://www.w3.org/1999/xhtml">

<Page title="Title">
<content>

<Panel>
<html:button> Button 1</html:button>
</Panel>
</content>
</Page>
</core:View>

Regards,

Narayan

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

VIPLOVE KHUSHALANI May 26, 2017 at 07:26 AM
0

Hi ,

Why you want to do that ... actually SAPUi5 supports binding not the HTML as it doesn't support MVC architecture .. If you want to apply binding to HTML than its not through SAPUI5 you can use knockout.js which uses MVVM architecture ...

https://stackoverflow.com/questions/9571056/bind-json-object-to-html-element

thanks

Viplove

Share
10 |10000 characters needed characters left characters exceeded