# JavaScript API Reference for Oracle ADF Faces

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

SUMMARY: FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

# oracle.adfinternal.view.js.util
Class AdfLoopbackUtils

## Warning:

- This is an unsupported, internal implementation class.
- Use an API class that might provide equivalent functionality instead.
- This class will change without notice.
- It is not recommended that you use anything in this class.

    org.ecmascript.object.Object
       |
       +--oracle.adfinternal.view.js.util.AdfLoopbackUtils

    public class AdfLoopbackUtils
    extends Object

## Field Summary

### Fields inherited from org.ecmascript.object.Object
`constructor, prototype`

## Constructor Summary
`public` | `AdfLoopbackUtils()`

## Method Summary
`private static Object` | `_addCookie(Object name, Object value)`
`private static Object` | `_addFontSizeParam(Object query, Object mediaFontSizeParam, Object mediaFontSizeCookieParam, Object cookiesEnabled)` Compute font size and add font size param
`private static Object` | `_addMediaFeatures(Object query, Object cookiesEnabled, Object mediaFontSizeParam, Object mediaTypeParam, Object mediaFeatureWidthParam, Object mediaFeatureHeightParam, Object mediaFeatureDeviceWidthParam, Object mediaFeatureDeviceHeightParam, Object mediaFeatureColorParam, Object mediaFeatureColorIndexParam, Object mediaFeatureMonochromeParam, Object mediaFeatureResolutionParam, Object mediaFeatureGridParam, Object mediaFeatureScanParam, Object mediaFeatureOrientationParam, Object mediaFontSizeCookieParam, Object mediaTypeCookieParam, Object mediaFeatureWidthCookieParam, Object mediaFeatureHeightCookieParam, Object mediaFeatureDeviceWidthCookieParam, Object mediaFeatureDeviceHeightCookieParam, Object mediaFeatureColorCookieParam, Object mediaFeatureColorIndexCookieParam, Object mediaFeatureMonochromeCookieParam, Object mediaFeatureResolutionCookieParam, Object mediaFeatureGridCookieParam, Object mediaFeatureScanCookieParam, Object mediaFeatureOrientationCookieParam)` Adds various media features to query string based on agent properties.
`private static Object` | `_addMediaTypeParam(Object query, Object mediaTypeParam, Object mediaTypeCookieParam, Object cookiesEnabled)` Derives media type by calling window.matchmedia on a list of possible media types and adds the matched media type as a query param
`private static Object` | `_addParam(Object queryString, Object paramName, Object cookieName, Object value, Object isCookie)`
`private static Object` | `_addQS(Object pname, Object pvalue)`
`public static Object` | `appendBodyStyle(Object extraStyle)` Add style to document body.
`private static Object` | `_cookiesEnabled()`
`private static Object` | `_findWithBinarySearch(Object feature, Object minVal, Object maxVal, Object unit)` Finds a feature value with binary search.
`private static Object` | `_getTouchFeature()`
`private static Object` | `_replaceCallback(Object p0, Object pname, Object p2, Object pvalue)`
`public static void` | `runLoopback(int viewIdLength, String loopbackIdParam, String loopbackId, String windowModeIdParam, String clientWindowIdParam, String pageIdParam, String pageIdValue, String windowId, String jsessionId, String adfHashMarker, boolean useCookies, String loopbackIdCookieParam, String windowModeCookieParam, String clientWindowIdCookieParam, String pageIdCookieParam, String redirectIdCookieParam, boolean pprNavigationOptionSet, Object internalParamsObj, String noLoopbackViewId, String mediaFontSizeParam, String mediaTypeParam, String mediaFeatureWidthParam, String mediaFeatureHeightParam, String mediaFeatureDeviceWidthParam, String mediaFeatureDeviceHeightParam, String mediaFeatureColorParam, String mediaFeatureColorIndexParam, boolean mediaFeatureMonochromeParam, String mediaFeatureResolutionParam, boolean mediaFeatureGridParam, boolean mediaFeatureScanParam, String mediaFeatureOrientationParam, String touchCapabilityParam, Object mediaFontSizeCookieParam, Object mediaTypeCookieParam, Object mediaFeatureWidthCookieParam, Object mediaFeatureHeightCookieParam, Object mediaFeatureDeviceWidthCookieParam, Object mediaFeatureDeviceHeightCookieParam, Object mediaFeatureColorCookieParam, Object mediaFeatureColorIndexCookieParam, Object mediaFeatureMonochromeCookieParam, Object mediaFeatureResolutionCookieParam, Object mediaFeatureGridCookieParam, Object mediaFeatureScanCookieParam, Object mediaFeatureOrientationCookieParam, Object touchCapabilityCookieParam)`
`public static void` | `runRedirect(String url, String cookieTemplate)`
`private static Object` | `_saveWindowId(string clientWindowIdParam)` Attempts to save the newly assigned windowId to session storage.

## Field Detail

## Constructor Detail

### AdfLoopbackUtils

`public AdfLoopbackUtils()`

## Method Detail

### _addCookie

`private static Object _addCookie(Object name,
Object value)`
  Parameters:

    `name` |  |
    `value` |  |

  Return:
    `Object`

### _addFontSizeParam

`private static Object _addFontSizeParam(Object query,
Object mediaFontSizeParam,
Object mediaFontSizeCookieParam,
Object cookiesEnabled)`
  Compute font size and add font size param
  Parameters:

    `query` |  |
    `mediaFontSizeParam` |  |
    `mediaFontSizeCookieParam` |  |
    `cookiesEnabled` |  |

  Return:
    `Object`

### _addMediaFeatures

`private static Object _addMediaFeatures(Object query,
Object cookiesEnabled,
Object mediaFontSizeParam,
Object mediaTypeParam,
Object mediaFeatureWidthParam,
Object mediaFeatureHeightParam,
Object mediaFeatureDeviceWidthParam,
Object mediaFeatureDeviceHeightParam,
Object mediaFeatureColorParam,
Object mediaFeatureColorIndexParam,
Object mediaFeatureMonochromeParam,
Object mediaFeatureResolutionParam,
Object mediaFeatureGridParam,
Object mediaFeatureScanParam,
Object mediaFeatureOrientationParam,
Object mediaFontSizeCookieParam,
Object mediaTypeCookieParam,
Object mediaFeatureWidthCookieParam,
Object mediaFeatureHeightCookieParam,
Object mediaFeatureDeviceWidthCookieParam,
Object mediaFeatureDeviceHeightCookieParam,
Object mediaFeatureColorCookieParam,
Object mediaFeatureColorIndexCookieParam,
Object mediaFeatureMonochromeCookieParam,
Object mediaFeatureResolutionCookieParam,
Object mediaFeatureGridCookieParam,
Object mediaFeatureScanCookieParam,
Object mediaFeatureOrientationCookieParam)`
  Adds various media features to query string based on agent properties. The input query string is the URL generated by this script and the output is the URL with appended media features as query params
  Parameters:

    `query` |  |
    `cookiesEnabled` |  |
    `mediaFontSizeParam` |  |
    `mediaTypeParam` |  |
    `mediaFeatureWidthParam` |  |
    `mediaFeatureHeightParam` |  |
    `mediaFeatureDeviceWidthParam` |  |
    `mediaFeatureDeviceHeightParam` |  |
    `mediaFeatureColorParam` |  |
    `mediaFeatureColorIndexParam` |  |
    `mediaFeatureMonochromeParam` |  |
    `mediaFeatureResolutionParam` |  |
    `mediaFeatureGridParam` |  |
    `mediaFeatureScanParam` |  |
    `mediaFeatureOrientationParam` |  |
    `mediaFontSizeCookieParam` |  |
    `mediaTypeCookieParam` |  |
    `mediaFeatureWidthCookieParam` |  |
    `mediaFeatureHeightCookieParam` |  |
    `mediaFeatureDeviceWidthCookieParam` |  |
    `mediaFeatureDeviceHeightCookieParam` |  |
    `mediaFeatureColorCookieParam` |  |
    `mediaFeatureColorIndexCookieParam` |  |
    `mediaFeatureMonochromeCookieParam` |  |
    `mediaFeatureResolutionCookieParam` |  |
    `mediaFeatureGridCookieParam` |  |
    `mediaFeatureScanCookieParam` |  |
    `mediaFeatureOrientationCookieParam` |  |

  Return:
    `Object`

### _addMediaTypeParam

`private static Object _addMediaTypeParam(Object query,
Object mediaTypeParam,
Object mediaTypeCookieParam,
Object cookiesEnabled)`
  Derives media type by calling window.matchmedia on a list of possible media types and adds the matched media type as a query param
  Parameters:

    `query` |  |
    `mediaTypeParam` |  |
    `mediaTypeCookieParam` |  |
    `cookiesEnabled` |  |

  Return:
    `Object`

### _addParam

`private static Object _addParam(Object queryString,
Object paramName,
Object cookieName,
Object value,
Object isCookie)`
  Parameters:

    `queryString` |  |
    `paramName` |  |
    `cookieName` |  |
    `value` |  |
    `isCookie` |  |

  Return:
    `Object`

### _addQS

`private static Object _addQS(Object pname,
Object pvalue)`
  Parameters:

    `pname` |  |
    `pvalue` |  |

  Return:
    `Object`

### appendBodyStyle

`public static Object appendBodyStyle(Object extraStyle)`
  Add style to document body.
  Parameters:

    `extraStyle` |  |

  Return:
    `Object`

### _cookiesEnabled

`private static Object _cookiesEnabled()`
  Return:
    `Object`

### _findWithBinarySearch

`private static Object _findWithBinarySearch(Object feature,
Object minVal,
Object maxVal,
Object unit)`
  Finds a feature value with binary search. The search is based on window.matchmedia function call on min-feature. e.g. window.matchMedia("(min-resolution: 400dpi)").matches) will be true when the resolution is at least 400 dpi.
  Parameters:

    `feature` |  |
    `minVal` |  |
    `maxVal` |  |
    `unit` |  |

  Return:
    `Object`

### _getTouchFeature

`private static Object _getTouchFeature()`
  Return:
    `Object`

### _replaceCallback

`private static Object _replaceCallback(Object p0,
Object pname,
Object p2,
Object pvalue)`
  Parameters:

    `p0` |  |
    `pname` |  |
    `p2` |  |
    `pvalue` |  |

  Return:
    `Object`

### runLoopback

`public static void runLoopback(int viewIdLength,
String loopbackIdParam,
String loopbackId,
String windowModeIdParam,
String clientWindowIdParam,
String pageIdParam,
String pageIdValue,
String windowId,
String jsessionId,
String adfHashMarker,
boolean useCookies,
String loopbackIdCookieParam,
String windowModeCookieParam,
String clientWindowIdCookieParam,
String pageIdCookieParam,
String redirectIdCookieParam,
boolean pprNavigationOptionSet,
Object internalParamsObj,
String noLoopbackViewId,
String mediaFontSizeParam,
String mediaTypeParam,
String mediaFeatureWidthParam,
String mediaFeatureHeightParam,
String mediaFeatureDeviceWidthParam,
String mediaFeatureDeviceHeightParam,
String mediaFeatureColorParam,
String mediaFeatureColorIndexParam,
boolean mediaFeatureMonochromeParam,
String mediaFeatureResolutionParam,
boolean mediaFeatureGridParam,
boolean mediaFeatureScanParam,
String mediaFeatureOrientationParam,
String touchCapabilityParam,
Object mediaFontSizeCookieParam,
Object mediaTypeCookieParam,
Object mediaFeatureWidthCookieParam,
Object mediaFeatureHeightCookieParam,
Object mediaFeatureDeviceWidthCookieParam,
Object mediaFeatureDeviceHeightCookieParam,
Object mediaFeatureColorCookieParam,
Object mediaFeatureColorIndexCookieParam,
Object mediaFeatureMonochromeCookieParam,
Object mediaFeatureResolutionCookieParam,
Object mediaFeatureGridCookieParam,
Object mediaFeatureScanCookieParam,
Object mediaFeatureOrientationCookieParam,
Object touchCapabilityCookieParam)`
  Parameters:

    `viewIdLength` | - | view Id length (characters),
    `loopbackIdParam` | - | loopback Id param name,
    `loopbackId` | - | loopback Id,
    `windowModeIdParam` | - | window mode param name,
    `clientWindowIdParam` | - | client window Id param name,
    `pageIdParam` | - | page Id param name,
    `pageIdValue` | - | page Id value,
    `windowId` | - | window Id,
    `jsessionId` | - | session Id that needs to be appended to the redirect URL
    `adfHashMarker` | - | if the hash portion begins with this string, it should be interpreted by the framework. Otherwise, it should be treated as an anchor
    `useCookies` | - | boolean indicating whether loopback values should be set as cookies,as opposed to query parameters
    `loopbackIdCookieParam` | - | loopback Id cookie name
    `windowModeCookieParam` | - | window mode cookie name
    `clientWindowIdCookieParam` | - | client window Id cookie name
    `pageIdCookieParam` | - | page Id cookie name
    `redirectIdCookieParam` | - | redirect Id cookie name
    `pprNavigationOptionSet` | - | true is PPR Navigation option is set, false otherwise
    `internalParamsObj` | - | an object whose keys are the names of the internal parameters and whose values evaluate as true
    `noLoopbackViewId` | - | View Id used where the page should be redirected when the session cannot be established due to the browser with disabled cookies accessing a server with URL rewriting disabled
    `mediaFontSizeParam` | - | font size used. For em related calculations.
    `mediaTypeParam` | - | Type of media. screen, tv etc
    `mediaFeatureWidthParam` | - | Width of the view port
    `mediaFeatureHeightParam` | - | Height of the view port
    `mediaFeatureDeviceWidthParam` | - | Width of the device
    `mediaFeatureDeviceHeightParam` | - | Height of the device
    `mediaFeatureColorParam` | - | number of bits per color component of the device
    `mediaFeatureColorIndexParam` | - | color index media feature
    `mediaFeatureMonochromeParam` | - | Whether the device is monochrome
    `mediaFeatureResolutionParam` | - | resolution of the device.
    `mediaFeatureGridParam` | - | Whether device is a grid device
    `mediaFeatureScanParam` | - | Scanning process of television devices.
    `mediaFeatureOrientationParam` | - | Orientation of the screen
    `touchCapabilityParam` | - | none/single/multiple based on whether edge browser supports touch/single touch/ multiple touch on the device in question
    `mediaFontSizeCookieParam` |  |
    `mediaTypeCookieParam` |  |
    `mediaFeatureWidthCookieParam` |  |
    `mediaFeatureHeightCookieParam` |  |
    `mediaFeatureDeviceWidthCookieParam` |  |
    `mediaFeatureDeviceHeightCookieParam` |  |
    `mediaFeatureColorCookieParam` |  |
    `mediaFeatureColorIndexCookieParam` |  |
    `mediaFeatureMonochromeCookieParam` |  |
    `mediaFeatureResolutionCookieParam` |  |
    `mediaFeatureGridCookieParam` |  |
    `mediaFeatureScanCookieParam` |  |
    `mediaFeatureOrientationCookieParam` |  |
    `touchCapabilityCookieParam` |  |

  Return:
    `void` - null

### runRedirect

`public static void runRedirect(String url,
String cookieTemplate)`
  Parameters:

    `url` | - | redirect URL
    `cookieTemplate` | - | cookie expression with a token for the expiration date

  Return:
    `void` - null

### _saveWindowId

`private static Object _saveWindowId(string clientWindowIdParam)`
  Attempts to save the newly assigned windowId to session storage. The AdfDhtmlPage.PAGE.__validateWindowId will attempt to restore the id if it's lost.
  Parameters:

    `clientWindowIdParam` | - | session storage item name

  Return:
    `Object`

SUMMARY: FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.