Let's follow up this discussion at the Neptune Community
(this forum will be kept in read-only mode)
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()
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.
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?
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.
Ah ok, I set the flag do not add view, just declare (Page element)