Application Packaging Standard

Last updated 18-Mar-2019

Data Exchange

Overview

UX1 sends data generated by itself or transferred by views to the active view through the named aps.context set. The data is available only after the view is initialized. Depending on the used control panel version, there are the following recommended ways to ensure the data availability:

  • In CP, the require plugin ensures the screen initialization by means of the aps/ready! argument:

    require([“aps/ready!”], function() {/* Callback function */});
    
It means, you can use the aps.context data in the callback function without any additional wait, because the function is called only after the view is initialized.
  • In UX1, the aps.context data is available since the onContext phase.

Data Components

Property Type DESCRIPTION
bs Boolean Indicates if the view is loaded in the IFrame created by bootstrapApp.html. If true, the single-page technology is used.
visibleMode Enum: "xs" or "md" Indicates if the view is displayed in respectively eXtra Small (mobile) or Medium Dimension (desktop) environment.
passwordQualityLevel Number Level of password strength requirements in the hosting platform.
baseUrl String Base URL to reach the view. Normally, it is /aps/2/resources.
vars Object Associative set of navigation variables passed to the view.
params Object Associative set of parameters that a view has passed to the current view when calling the latter via the gotoView method.
wizardState Object Set of steps in a wizard as explained in the Navigation Processing section.
wizardData Object Set of shared data generated by each view in a wizard as explained in the Shared Data section.
subscriptionId String APS ID of a customer subscription. The view can specify it when sending a REST request to provision or update a resource in a certain subscription as explained in the Specify Subscription ID section.
viewId String Current view ID as declared in meta.
bssCurrencySettings Object Shows the currency used by the current customer in the Business Support System of the hosting platform.

Shared Data

To share data between all views of an application, the UX1 mode provides the aps.app object. Any view can add any data to it and through this object make the data available for all other views of the application.