Hi experts,
I have an OData service that is read and displayed in a Table. The Table has properties:
mode : sap.m.ListMode.SingleSelectMaster,
selectionChange: function(evt) { oApp.to(oItemView,this.getSelectedItem().getBindingContext()); },
So when the user clicks on a row of the Table, the App goes to Page oItemView, and passes the output of the method this.getSelectedItem().getBindingContext() as evt.data in onBeforeShow of the oItemView page.
So far so good. But I admit I'm a little confused now. I am trying to pass the BindingContext back into a Model, but I can't use sap.ui.model.odata.ODataModel: this requires an URL. However, my Data is not coming from an URL, it is coming from evt.data. How can I bind this Data back to a Model to use in my oItemView page?
Below is the toString() value of the BindingContext Object to give an example of the structure of the data.
/LES_RCKSet(Mandt='100',Pernr='99000001',Datum=datetime'2014-11-05T00%3A00%3A00',Rueckid='UK-LEAVE',Stunden=8.00m,Lart='',Text='Holiday',Subid='',Crinfo='',Ueberhang='',PernrRg='00000000')