Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Ajax call with response not bound to a component


I have a very special requirement. I want to load data from backend at startup of the app, and store the values (config) in a global object. Is it possible to use Neptune Framework Ajax to get the data?

e.g. var globalConfig = getOnlineConfigData()



Hi Markus

You can use an Ajax object from sap.m -> simpleControls. Then you can set what data to retrieve and use ajaxSuccess/ajaxError. 

You can add a script tag and insert the following code to fire the ajax call when you start the App.


Ole Andre 

Thank you for your reply.

But how to I define a model, I habe no page or sthg. similar where I can bind the sap structure to, and without that, the getOnlineSynch() Ajax doesn't return any values?



Hi Markus

Why can't you bind a object ? You need to define a structure in the application class and bind it to an object.The binded object will be a data placeholder, no need to display the object since you will only use it to access the data.


Ole Andre 

Ah ok, I set the flag do not add view, just declare (Page element)


Login or Signup to post a comment