Package | mx.data |
Class | public dynamic class ItemReference |
Inheritance | ItemReference AsyncToken EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services for Java EE 3 |
Runtime Versions: | 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.
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
message : IMessage [read-only]
Provides access to the associated message. | AsyncToken | ||
responders : Array [read-only]
An array of IResponder handlers that will be called when
the asynchronous request completes. | AsyncToken | ||
result : Object [read-only]
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 |
Method | Defined By | ||
---|---|---|---|
ItemReference(msg:IMessage)
Constructor. | ItemReference | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Adds a responder to an Array of responders. | AsyncToken | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Determines if this token has at least one mx.rpc.IResponder registered. | AsyncToken | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Releases the managed item reference retrieved with the
getItem() or createItem() method call that returned
this ItemReference. | ItemReference | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
valid | property |
valid:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services for Java EE 3 |
Runtime Versions: | 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.
This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange
event.
Implementation
public function get valid():Boolean
public function set valid(value:Boolean):void
ItemReference | () | Constructor |
releaseItem | () | method |
public function releaseItem(copyStillManagedItems:Boolean = true, enableStillManagedCheck:Boolean = true):void
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services for Java EE 3 |
Runtime Versions: | 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.
Parameters
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.gteItem() 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 )
|
Wed Nov 21 2018, 06:34 AM -08:00