Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 26, 2017 at 07:26 AM

    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

    Add comment
    10|10000 characters needed characters exceeded