Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8851

Binding to HTML View with Formatter

$
0
0

Hi,

 

I'm trying to bind a value to my sap.m.Text using the following HTML:

 

<div data-sap-ui-type="sap.m.Text" data-text={name} id="name"></div>

and it works just fine but what I would like to do is to pass a formatter such as:

 

 

<div data-sap-ui-type="sap.m.Text" data-text="{path: 'name', formatter: 'com.myformatter.Formatter.formatName'}" id="name"></div>

 

but doesn't seem to work and it just displays empty text.

 

I understand that I can also do this on the controller but I prefer to do it on the HTML View to keep things tidy.

 

Any idea?

 

Thanks in advance.

 

Marc


Viewing all articles
Browse latest Browse all 8851

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>