You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Offline Post VBCS with Business Object

edited Nov 25, 2019 5:48PM in Visual Builder 13 comments

Content

Hi i need to do a Get and Post with offline service, i follow some steps for this post here, https://blogs.oracle.com/shay/adding-offline-capabilities-to-an-oracle-visual-builder-app. But my Post doesn't work, and i'm try to do this for Mobile VBCS. This my code: 

define([
    'vbsw/helpers/serviceWorkerHelpers',
    'persist/persistenceManager',
    'persist/defaultResponseProxy',
    'persist/persistenceUtils',
    'persist/fetchStrategies',
    'persist/impl/logger'
  ],
  function(ServiceWorkerHelpers, PersistenceManager, DefaultResponseProxy,
    PersistenceUtils, FetchStrategies, Logger) {
    'use strict';

    function AppModule() {}

    function OfflineHandler() {

      Logger.option('level', Logger.LEVEL_LOG);
      Logger.option('writer', console);

      var options = {

        requestHandlerOverride: {
          handlePost: handlePost
        },
        fetchStrategy: FetchStrategies.getCacheIfOfflineStrategy({
          backgroundFetch: 'disabled'
        })
      };
      this._responseProxy = DefaultResponseProxy.getResponseProxy(options);
    }

    OfflineHandler.prototype.handleRequest = function(request, scope) {

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!