Let's follow up this discussion at the Neptune Community

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

AppCache and Offline ModelData

 Hi,


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.


Best regards,

Holger Wingold




Hi Holger


If you use NAD 2.20 SP03 - Please check the Addon for Offline ModelData



If you use NAD 2.20 SP01 - SP02, please create a Scriptblock and insert the ModelData object from the Offline javascript helpers.




Regards

Ole Andre

Hi Ole Andre,

thanks for your reply. I am using NAD 2.20 SP03 and I also have the Addon ModelData checked.

But after reading my previous post again, I realized that I was a little bit imprecisely. The application is actually running in the NAD preview, but it is _not_ running in the preview from 'Neptune AppCache Configuration' (TX: /NEPTUNE/APPCACHE) and also not running on a device.

The index.html-file is different in both environments (see attached files index1.html from NAD preview and index2.html from AppCache Configuration preview).

The file index1.html contains the line:

<script type="text/javascript" src="/neptune/server/neptune/js/ModelData-1.0.js"></script>


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?


Best regards

Holger Wingold

 

html
(19.1 KB)
html
(33.7 KB)

Hi Holger


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.


Regards

Ole Andre

Login or Signup to post a comment