Paket | mx.data |
Klass | public dynamic class ItemReference |
Arv | ItemReference AsyncToken EventDispatcher Object |
Implementerar | IItemReference |
Språkversion: | ActionScript 3.0 |
Produktversion: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
DataService.getItem()
and DataService.createItem()
methods to provide a way to manage a reference to the remote object.
The AsyncToken implementation that this class extends provides a list of
responders to be notified of result and fault events that occur on the
operation to retrieve the item (the get or the create).
A binding can be made to the value of the result
property
that always maintains a reference to the managed instance.
If the item is deleted in another client, the result
property
will be set to null.
If a fault occurs and the DatService instance cannot retrieve the item,
the invalid
property is set to true
.
Listen for the fault event to get more information about what caused
the error.
To release the reference to this managed item, call the
ItemReference.releaseItem()
method.
This is similar to calling the DataService.releaseItem()
method
however, unlike the DataService.releaseItem()
this method
releases this reference rather than the first item instance found of that
type.
This occurs when more than one getItem()
method call to retrieve
the same item from different parts of an application is made.
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
message : IMessage [skrivskyddad]
Provides access to the associated message. | AsyncToken | ||
responders : Array [skrivskyddad]
An array of IResponder handlers that will be called when
the asynchronous request completes. | AsyncToken | ||
result : Object [skrivskyddad]
The result that was returned by the associated RPC call. | AsyncToken | ||
valid : Boolean
Set to false if the ItemReference becomes invalid
either because the server faulted when trying to retrieve the item
or if the retrieved item was itself null. | ItemReference |
Metod | Definieras med | ||
---|---|---|---|
ItemReference(msg:IMessage)
Constructor. | ItemReference | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Adds a responder to an Array of responders. | AsyncToken | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Determines if this token has at least one mx.rpc.IResponder registered. | AsyncToken | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Releases the managed item reference retrieved with the
getItem() or createItem() method call that returned
this ItemReference. | ItemReference | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
valid | egenskap |
valid:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Set to false
if the ItemReference becomes invalid
either because the server faulted when trying to retrieve the item
or if the retrieved item was itself null.
This property can be used to bind to your user interface controls to
display status information for this item without having to listen for
explicit fault events.
Den här egenskapen kan användas som källan för databindning. När den här egenskapen ändras, skickas händelsen propertyChange
.
Implementering
public function get valid():Boolean
public function set valid(value:Boolean):void
ItemReference | () | Konstruktor |
releaseItem | () | metod |
public function releaseItem(copyStillManagedItems:Boolean = true, enableStillManagedCheck:Boolean = true):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Releases the managed item reference retrieved with the
getItem()
or createItem()
method call that returned
this ItemReference.
It is possible to have more than one ItemReference that points to the
same item on the same client.
Use this method to release the proper reference.
Parametrar
copyStillManagedItems:Boolean (default = true ) — Boolean indicating that a copy of this item should be
placed in this ItemReference should the current item still be referenced.
This can occur if more than one call to DataService.getItem() for this
same item is made, or if this item is referenced by a collection returned from a call to
DataService.fill() .
| |
enableStillManagedCheck:Boolean (default = true ) — Boolean indicating if the item should be checked for
additional references.
|
Tue Jun 12 2018, 01:40 PM Z