on 2015 Oct 30 7:53 AM
I am executing the following code:
new sap.ui.commons.form.FormElement({
label: new sap.ui.commons.Label({
text: oBundle.getText(
"UI_SERVICE_MODEL_ID"),
layoutData: new sap.ui.commons.form.GridElementData({
hCells: "5"
})
}),
fields: [new sap.ui.commons.CheckBox().bindProperty("checked", "/validation"),]
}),
but the property binding is not working. It is unchecked always.
Hi Archana,
Are you doing aggregation binding for form?
If so try like this -
fields: [new sap.ui.commons.CheckBox().bindProperty("checked", "validation")
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai,
Yes this also I have tried this as well. Not working.
This is my model:
{"d":{"__metadata":{"id":"https://localhost:8083/gateway/odata/RESERVEDFORSAPIGW/REPOSITORYSERVICE/RegisteredServices(guid'f51...')","serviceName":"CRM_OPPORTUNITY","nameSpace":"SAP","serviceVersion":1,"serviceDescription":"CRM Opportunity","status":true,"validation":true,"createdBy":null,"changedBy":null,"createdOn":"\/Date(1445443284466+0330)\/","changedOn":"\/Date(1446206712788+0330)\/","type":"BEP","dpc":"com.sap.gateway.core.bep.dp.ODataProcessor","mpc":"com.sap.gateway.core.bep.md.BEPEdmProvider","modelID":"CRM_OPPORTUNITY_0001","sourceServiceId":null,"technicalServiceName":null,"metaDataUrl":null,"serviceUrl":"https://localhost:8083/gateway/odata/SAP/CRM_OPPORTUNITY;v=1","defaultDestination":"QHD","isDestAssignedForEntity":false,"AssignedDestinations":{"__deferred":{"uri":"https://localhost:8083/gateway/odata/RESERVEDFORSAPIGW/REPOSITORYSERVICE/RegisteredServices(guid'f51..."}},"AssignedDestinationsForEntity":{"__deferred":{"uri":"https://localhost:8083/gateway/odata/RESERVEDFORSAPIGW/REPOSITORYSERVICE/RegisteredServices(guid'f51..."}}}}
Thanks,
Archana
will this Helpful? JS Bin - Collaborative JavaScript Debugging
Manipulate your JSON model.
Or
Give a rite path to your Element( "/d/Metadata......"
var model = {"d":{"__metadata":
"serviceName":"CRM_OPPORTUNITY","nameSpace":"SAP","serviceVersion":1,"serviceDescription":"CRM Opportunity",
"status":true,"validation":true,"createdBy":null,"changedBy":null,"createdOn":"\/Date(1445443284466+0330)\/","changedOn":"\/Date(1446206712788+0330)\/",
"type":"BEP","dpc":"com.sap.gateway.core.bep.dp.ODataProcessor","mpc":"com.sap.gateway.core.bep.md.BEPEdmProvider","modelID":"CRM_OPPORTUNITY_0001","sourceServiceId":null,
"technicalServiceName":null,"metaDataUrl":null,"serviceUrl":"https://localhost:8083/gateway/odata/SAP/CRM_OPPORTUNITY;v=1","defaultDestination":"QHD",
"isDestAssignedForEntity":false,"AssignedDestinations":
{"__deferred":{"uri":"https://localhost:8083/gateway/odata/RESERVEDFORSAPIGW/REPOSITORYSERVICE/RegisteredServices(guid'f51..."}},
"AssignedDestinationsForEntity":{"__deferred":{"uri":"https://localhost:8083/gateway/odata/RESERVEDFORSAPIGW/REPOSITORYSERVICE/RegisteredServices(guid'f51..."
}}}}};
model = model.d.__metadata;
debugger;
var model1 = new sap.ui.model.json.JSONModel(model);
sap.ui.getCore().setModel(model1);
Thanks,
KA
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.