on 2014 Jan 08 7:04 PM
With JS views it is possible to add type information to a field, for example:
oControl = new sap.ui.commons.TextField({
value: {
path:"/company/revenue",
type: new sap.ui.model.type.Float({
minFractionDigits: 2,
maxFractionDigits: 2
})
}
})
See https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/BindingProperties.html
I've tried the same with XML views (according to https://sapui5.hana.ondemand.com/sdk/test-resources/sap/m/demokit/explored/index.html#/code/inputChe... ) without success
Please check my gist example: Binding problems with UI5 and XML views
Am I doing something wrong?
Request clarification before answering.
Hi,
No, you are doing fine!
The thing that is missing is what the documentation forgets to say.
<script src="resources_path/sap-ui-core.js" id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-xx-bindingSyntax="complex">
</script>
There is needed to tell the core that you are using a complex binding syntax. I don't know why that is not a default option, but that is the way it is.
Regards,
Luis Alberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.