Skip to Content
0
Former Member
Nov 09, 2015 at 05:34 PM

set a control's model

23 Views

Hello,

What I want to do is firstly create a entry, then set the entry as my view's model

my code is like

oDataModel.create('/entries', entry, {

success : function(oData) {

var oVizFrame = self.getView().byId("idoVizFrame");

oVizFrame.setModel(new JSONModel("/enties('"+oData.Id+"')"));

}

});

The oDataModel contain the service root path so I pass only '/entries/'

however, in this line

oVizFrame.setModel(new JSONModel("/enties(guid'"+oData.Id+"')"));


how can I get my root path?


Besides, is there a better way to do it?


Thanks a lot