SAPUI5 and OData dynamic Login
can anybody share some standard code that sapui5 and odata dynamic login screen navigation ?
Means User has to pass input Username and Password atrun time and get login.
Thank you in advanced
Hi Anil, As i see you were using the ODataModel,
Why cant you use the ODataModel, constructor to pass your url with username and password?
var serviceURI = "http://192.168.0.7:8000/sap/opu/odata/sap/YNEW_SRV/";
var username = sap.ui.getCore().getControl("oNameInput") .getValue();
var password = sap.ui.getCore().getControl("oPWInput") .getValue();
var OData = new sap.ui.model.odata.ODataModel(serviceURI,true ,username,password);
Please have a look at the below link for other methods of ODataModel,
Also make sure you use the same Library version like the previous link, you can see at the footer of the link for version details.