Referencia de ActionScript® 3.0 para la plataforma de Adobe® Flash®
Inicio  |  Ocultar lista de paquetes y clases |  Paquetes  |  Clases  |  Novedades  |  Índice  |  Apéndices  |  ¿Por qué hay texto en inglés?
Filtros: Recuperando datos del servidor...
Recuperando datos del servidor...
com.adobe.mosaic.om.interfaces 

IContext  - AS3 ADEP Composite Application

Paquetecom.adobe.mosaic.om.interfaces
Interfazpublic interface IContext

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

The IContext interface models a simple hash map that allows tiles to store attibutes in name-value pairs. The name-value pairs are uniquely identified by their names, and any tile can reference a name-value pair using the unique identifier.

The context is specific to its accessor. For example, the mosaicApp.context is shared for the application, whereas the IView.context is shared for only the specific view.



Métodos públicos
 MétodoDefinido por
  
Adds a watcher to a specific set of context attributes.
IContext
  
Adds a watcher to the context.
IContext
  
Returns a named attribute from the context.
IContext
  
Returns an array of named attributes from the context.
IContext
  
Removes a watcher from a specific set of context attributes.
IContext
  
Removes a watcher from the context.
IContext
  
setAttribute(name:String, value:*):void
Sets a single attribute in the context to a value.
IContext
  
setAttributes(names:Array, values:Array):void
Sets an array of context attributes.
IContext
Información sobre métodos

addAttributesWatcher

()método
public function addAttributesWatcher(name:Array, listener:Object, tile:com.adobe.mosaic.om.interfaces:ITile):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Adds a watcher to a specific set of context attributes.

The watcher only triggers when all the attributes are set by a call to setAttributes that matches the list of watched attributes.

Parámetros

name:Array — The name of the context object to watch.
 
listener:Object — A function that takes in one parameter of type PropertyChangeEvent that will be called any time a set is called with this name.
 
tile:com.adobe.mosaic.om.interfaces:ITile — The tile that added the watcher. The tile must be specified in order for the tile to observe its contextWatcherPolicy

Elementos de API relacionados

addAttributeWatcher

()método 
public function addAttributeWatcher(name:String, listener:Object, tile:com.adobe.mosaic.om.interfaces:ITile):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Adds a watcher to the context.

The context watchers behave similar to watchers in Flex, with the exception that the context attributes do not need to be set in advance of creating the watcher. This way a tile can watch for an attribute that has not previously been set.

Parámetros

name:String — The name of the context object to watch.
 
listener:Object — A function that takes in one parameter of type PropertyChangeEvent that will be called any time a set is called with this name.
 
tile:com.adobe.mosaic.om.interfaces:ITile — The ITile with the reference to the attribute being watched

Elementos de API relacionados

getAttribute

()método 
public function getAttribute(name:String):*

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Returns a named attribute from the context.

Parámetros

name:String — The name of the attribute to retrieve.

Valor devuelto
* — The attribute stored in the context.

Elementos de API relacionados

getAttributes

()método 
public function getAttributes(names:Array):Array

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Returns an array of named attributes from the context.

Parámetros

names:Array — The names of the attributes to retrieve.

Valor devuelto
Array — The objects stored in the context.

Elementos de API relacionados

removeAttributesWatcher

()método 
public function removeAttributesWatcher(names:Array, listener:Object):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Removes a watcher from a specific set of context attributes.

The watcher only triggers when all the attributes are set by a call to setAttributes that matches the list of watched attributes.

Parámetros

names:Array — The name of the context object to no longer watch.
 
listener:Object — A function that takes in one parameter of type PropertyChangeEvent that will be called any time a set is called with this name.

Elementos de API relacionados

removeAttributeWatcher

()método 
public function removeAttributeWatcher(name:String, listener:Object):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Removes a watcher from the context.

The context watchers behave similar to watchers in Flex, with the exception that the context attributes do not need to be set in advance of creating the watcher. This way a tile can watch for an attribute that has not previously been set.

Parámetros

name:String — The name of the context object to no longer watch.
 
listener:Object — A function that takes in one parameter of type PropertyChangeEvent that will be called any time a set is called with this name.

Elementos de API relacionados

setAttribute

()método 
public function setAttribute(name:String, value:*):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Sets a single attribute in the context to a value. Attribute names must follow the variable naming conventions in ActionScript (must start with a letter, etc).

Parámetros

name:String — The name of the attribute to set.
 
value:* — An object to store in the context.

Elementos de API relacionados

setAttributes

()método 
public function setAttributes(names:Array, values:Array):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 9.5
Versiones de motor de ejecución: AIR 2.6, Flash Player 10.2

Sets an array of context attributes.

This method differs from setAttribute() in that it sets the values of many attributes at once. If a watcher for this set of attributes was previously added with addAttributesWatcher(), then this method will trigger a PropertyChangeEvent.

Example:
		 context.addAttributesWatcher(arrayAttributeNames, handleContextAttributesChanged, m_tileThis);
		 
		 context.setAttributes(arrayAttributeNames, arrayAttributeValues);
		 
		 // Handler for the multiple-attributes-changed event caused by IContext.setAttributes()
		 private function handleContextAttributesChanged(event:PropertyChangeEvent):void {
		    var nNumAttributesNames:int = event.property.length;
		    var strNewAttributeValuesInfo:String = "";
		 
		    for (var nAttributeCounter:int = 0; nAttributeCounter < nNumAttributesNames; nAttributeCounter++) {
		       var strAttributeName:String = event.property[nAttributeCounter].toString();
		       var strOldAttributeValue:String = event.oldValue[nAttributeCounter].toString();
		       var strNewAttributeValue:String = event.newValue[nAttributeCounter].toString();
		       strNewAttributeValuesInfo += 'Attribute "' + strAttributeName + '" value changed from "' + strOldAttributeValue + '" to "' + strNewAttributeValue + '"';
		    }
		 
		    Alert.show(strNewAttributeValuesInfo);
		 }
		 

Parámetros

names:Array — An array of the names of attributes to set in the context.
 
values:Array — An array of the values to set for the attributes.

Elementos de API relacionados





[ X ]¿Por qué hay texto en inglés?
Cierto contenido de la Referencia de ActionScript 3.0 se muestra en inglés

No todo el contenido de la Referencia de ActionScript 3.0 se traduce a todos los idiomas. Si un elemento del lenguaje no se traduce, aparecerá en inglés. Por ejemplo, la clase ga.controls.HelpBox no está traducida en ningún idioma. Por lo tanto, en la versión en español de la referencia, la clase ga.controls.HelpBox aparecerá en inglés.