To create a context object and use it to retrieve a response filter key, add code similar to the following to the widget’s JavaScript file. Note that you must also add a dependency on the CCStoreConfiguration library.

// Add the CCStoreConfiguration library as a dependency for this widget

// Create the context object and populate it
var contextObj = {};
    contextObj["endpoint"] = "endpoint-name";
    contextObj["identifier"] = "identifier-in-filter-map";

// Call the getFilterToUse method to retrieve the response filter key
var filterKey = CCStoreConfiguration.getInstance().getFilterToUse(contextObj);

// Add the filterKey to the data passed with the REST call
if (filterKey) {
  data["filterKey"] = filterKey;
}

//Make the REST call
ccRestClient.request(url, data,
      this.successFunc.bind(this),
      this.errorFunc.bind(this));
}

Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices