javascript - How to directly bind two data properties into one control property using OData model? -


i using odata model bind ui controls gw services. in service metadata, there are, say, "firstname" , "lastname" in data structure. on ui, say, using label control.

now question how bind text property of label string of "fullname" (which "firstname"+"lastname") using odata model directly? if use json model, can create local variable, fullname = firstname + lastname, , bind text property fullname. how using odata model?

additionally, can enable complex data binding in sap-ui-core.js:

<script src="resources/sap-ui-core.js"         id="sap-ui-bootstrap"         data-sap-ui-libs="sap.ui.commons,sap.ui.table,sap.ui.ux3"         data-sap-ui-xx-bindingsyntax="complex"></script> 

and use both properties:

var olabel = new sap.ui.commons.label({         text : "{firstname} {lastname}" }); 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -