Let's follow up this discussion at the Neptune Community
(this forum will be kept in read-only mode)
I've encountered a problem trying to use AppCache in combination with Offline ModelData.
I have created an offline application according to the webinar published here, which works well after some minor adjustments. Afterwards I created an AppCache configuration.
But now some event handlers using the ModelData object, e.g. ModelData.genID() or ModelData.Update(...) do not work anymore. These functions throws an
Uncaught ReferenceError: ModelData is not defined
As a workaround I manually added the ModelData-1.0.js file to index.html after a phonegap export. Now the application is running on a device but not in the NAD preview.
Is the ModelData accidentally missing in the AppCache configuration? Is there another way to get AppCache and ModelData running together?
Thanks for your support.
If you use NAD 2.20 SP03 - Please check the Addon for Offline ModelData
which is missing in index2.html.
As a workround I've added this line manually to index.html after a phonegap export like I mentioned before. Now the application is running on a device.
Maybe there is a problem with the missing line?
The reason is the libraries that are selected in the application: NEPTUNE_APPCACHE. Since this is the parent App when you use the AppCache Configuration the export will read and export all libraries in this app.
You can copy the NEPTUNE_APPCACHE and set all libraries needed.