Hi All,
Here's an excerpt of code from an app I'm testing out. The code is in the createContent of the view and has had the context bound to the view. All the bindings work fine and all the values are displayed as expected.
For the ActionSheet control (oCallSheet), line 38, it seems I have find the path from the root in order to properly bind to the icl_phone_number collection. Strange because all the other bindings seem to reference the correct data, which is the contact person id passed in - e.g. - line 13 displays fine, line 15 works as well.
Workaround right now is to manually pull the path ID from the view name, which I create when navigating from master to this detail page. Any insight?
var btnCallMenu = new sap.m.Button({ text : "{i18n>CALL}", tooltip : "{i18n>CALL}", icon : "sap-icon://outgoing-call", press: function () { oCallSheet.setPlacement(sap.m.PlacementType.Vertical); oCallSheet.setShowCancelButton(true); oCallSheet.openBy(this); } }); var oCallButton = new sap.m.Button({ text: "{phone}", icon: { path: "/icl_phone_type/type", formatter: function (fValue) { switch (fValue) { case 'residence': return 'sap-icon://home'; case 'cell': return 'sap-icon://iphone'; default: return 'sap-icon://phone'; } } }, press: [oController.onCall] }).addStyleClass("newButton"); // CALL ACTION SHEET var oCallSheet = new sap.m.ActionSheet({ placement: sap.m.PlacementType.Bottom, cancelButtonPress: function () { jQuery.sap.log.info("oCallSheet: Cancel Button Pressed"); } }); oCallSheet.bindAggregation("buttons", "/value/" + sID + "/icl_phone_number", oCallButton);
Sorry, to add, my question is, why doesn't the following work?
oCallSheet.bindAggregation("buttons", "icl_phone_number", oCallButton);
Thanks!