OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.behavior
Class AdfMatchMediaBehavior

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.base.AdfClientBehavior
               |
               +--oracle.adfinternal.view.js.behavior.AdfMatchMediaBehavior

public class AdfMatchMediaBehavior
extends AdfClientBehavior
Client behavior implementation for responsive design based on media queries. The component which has this behavior will opt to change one or more of its properties on a media match. propertyName - name of the client component property to be changed on media query match/unmatch. matchedPropertyValue - value of the property on media query match. unmatchedPropertyValue - value of the property if media query does not match. matchedInServer - indicates whether this was matched in server in which case this behavior will have the correct unmatchedPropertyValue. The unmatchedPropertyValue will be stored as page property.



Field Summary

private Object
_matched
private Object
_matchedPropertyValue
private static Object
_MEDIA_QUERY_LISTENERS
Key to get a map of media query string to custom MediaQueryList object.
private Object
_mediaQuery
private Object
_mql
private Object
_propertyName
private static Object
_UNMATCHED_PROPERTY_KEY
Key to get a map of clientIds to unmatched property values from page.
private Object
_unmatchedPropertyValue


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfMatchMediaBehavior(Object propertyName, Object matchedPropertyValue, Object mediaQuery, Object unmatchedPropertyValue, Object matchedInServer)
Client behavior implementation for responsive design based on media queries.


Method Summary

private Object
_addToMediaQueryList()
Pushes the callbacks/listeners into the mediaQueryList.
public Object
destroy()
Overridden from AdfClientBehavior.
private Object
_getMediaQueryListeners()
Gets a map of media query string to custom MediaQueryList object
private Object
_getUnmatchedPropertyValues()
Gets a map of clientIds to unmatched property values
private Object
_handleChange(Object mql)
Callback method called from PAGE when it finds that media has matched or unmatched.
protected Object
Init(Object propertyName, Object matchedPropertyValue, Object mediaQuery, Object unmatchedPropertyValue, Object matchedInServer)
Initializes the instance.
public Object
initialize(Object component)
Overriding base method from AdfClientBehavior
private Object
_isPropertyChanged()
Check whether the property was set by this Client behavior only.
private static Object
_mediaQueryListEventListener(Object mql)
Function that gets notified on the media Query listener notification.
private Object
_saveUnmatchedPropertyValues()
Store unmatchedProperty values map as page property.
private Object
_setDefaultProperty()
Sets the unmatchedPropertyValue on media mismatch match and PPRs.
private Object
_setMediaQueryListeners(Object mediaQueryListenerMap)
Sets a map of media query string to custom MediaQueryList object
private Object
_setProperty()
Sets the matchedPropertyValue on media match and PPRs.
private Object
_setUnmatchedPropertyValues(Object unmatchedPropertyValues)
Sets a map of clientIds to unmatched property values


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_matched

private Object _matched

_matchedPropertyValue

private Object _matchedPropertyValue

_MEDIA_QUERY_LISTENERS

private static Object _MEDIA_QUERY_LISTENERS

Key to get a map of media query string to custom MediaQueryList object. This ensure that there are minimal MediaQueryList's created in page.

_mediaQuery

private Object _mediaQuery

_mql

private Object _mql

_propertyName

private Object _propertyName

_UNMATCHED_PROPERTY_KEY

private static Object _UNMATCHED_PROPERTY_KEY

Key to get a map of clientIds to unmatched property values from page. When a media query doesn't match, unmatched value is queried from this map and set in the component.

_unmatchedPropertyValue

private Object _unmatchedPropertyValue

Constructor Detail


AdfMatchMediaBehavior

public AdfMatchMediaBehavior(Object propertyName,
                             Object matchedPropertyValue,
                             Object mediaQuery,
                             Object unmatchedPropertyValue,
                             Object matchedInServer)

Client behavior implementation for responsive design based on media queries. The component which has this behavior will opt to change one or more of its properties on a media match. propertyName - name of the client component property to be changed on media query match/unmatch. matchedPropertyValue - value of the property on media query match. unmatchedPropertyValue - value of the property if media query does not match. matchedInServer - indicates whether this was matched in server in which case this behavior will have the correct unmatchedPropertyValue. The unmatchedPropertyValue will be stored as page property.

Parameters:
propertyName    
matchedPropertyValue    
mediaQuery    
unmatchedPropertyValue    
matchedInServer    

Method Detail


_addToMediaQueryList

private Object _addToMediaQueryList()

Pushes the callbacks/listeners into the mediaQueryList. If an appropriate List doesn't already exist for this mediaQuery, one is created.

Return:
Object

destroy

public Object destroy()

Overridden from AdfClientBehavior. Unregisters the listeners from PAGE while uninitializing.

Return:
Object
Overrides:
AdfClientBehavior.destroy(Object)

_getMediaQueryListeners

private Object _getMediaQueryListeners()

Gets a map of media query string to custom MediaQueryList object

Return:
Object

_getUnmatchedPropertyValues

private Object _getUnmatchedPropertyValues()

Gets a map of clientIds to unmatched property values

Return:
Object

_handleChange

private Object _handleChange(Object mql)

Callback method called from PAGE when it finds that media has matched or unmatched.

Parameters:
mql    
Return:
Object

Init

protected Object Init(Object propertyName,
                      Object matchedPropertyValue,
                      Object mediaQuery,
                      Object unmatchedPropertyValue,
                      Object matchedInServer)

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Parameters:
propertyName    
matchedPropertyValue    
mediaQuery    
unmatchedPropertyValue    
matchedInServer    
Return:
Object
See also:
AdfMatchMediaBehavior(Object, Object, Object, Object, Object)
Overrides:
AdfObject.Init()

initialize

public Object initialize(Object component)

Overriding base method from AdfClientBehavior

Parameters:
component    
Return:
Object
Overrides:
AdfClientBehavior.initialize(Object)

_isPropertyChanged

private Object _isPropertyChanged()

Check whether the property was set by this Client behavior only.

Return:
Object

_mediaQueryListEventListener

private static Object _mediaQueryListEventListener(Object mql)

Function that gets notified on the media Query listener notification. From here all the behaviors are called from the custom MediaQueryList object.

Parameters:
mql    
Return:
Object

_saveUnmatchedPropertyValues

private Object _saveUnmatchedPropertyValues()

Store unmatchedProperty values map as page property.

Return:
Object

_setDefaultProperty

private Object _setDefaultProperty()

Sets the unmatchedPropertyValue on media mismatch match and PPRs.

Return:
Object

_setMediaQueryListeners

private Object _setMediaQueryListeners(Object mediaQueryListenerMap)

Sets a map of media query string to custom MediaQueryList object

Parameters:
mediaQueryListenerMap    
Return:
Object

_setProperty

private Object _setProperty()

Sets the matchedPropertyValue on media match and PPRs.

Return:
Object

_setUnmatchedPropertyValues

private Object _setUnmatchedPropertyValues(Object unmatchedPropertyValues)

Sets a map of clientIds to unmatched property values

Parameters:
unmatchedPropertyValues    
Return:
Object

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

 

Generated on 2017.04.19 06:37 UTC
Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.