| Package | mx.data |
| Class | public class Conflict |
| Inheritance | Conflict Object |
ConflictDetector object.
To customize local conflict detection the ConflictDetector
can be extended and assigned to the DataService.conflictDetector
property.
All conflicts must be resolved before changes can be committed.
| Property | Defined by | ||
|---|---|---|---|
| cause : DataMessage
[read-only]
Returns the
DataMessage that caused the conflict. | Conflict | ||
| clientObject : Object
[read-only]
Returns the state of the client object (whose property was changed)
at the time of the conflict.
| Conflict | ||
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance.
| Object | |
| destination : String
[read-only]
Returns the destination for the data service of the item involved
in this conflict.
| Conflict | ||
| originalObject : Object
[read-only]
Returns the state of the original client object before its properties
were changed, as known at the time of the conflict.
| Conflict | ||
| propertyNames : Array
[read-only]
Returns an Array of the names of the properties that were
in conflict between the client change and the remote item state.
| Conflict | ||
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
| resolved : Boolean
[read-only]
Indicates whether this Conflict has been resolved
(
acceptClient() or acceptServer() has been
called). | Conflict | ||
| serverObject : Object
[read-only]
Returns the value of server object whose property was to be changed.
| Conflict | ||
| serverObjectReferencedIds : Object
[read-only]
If the serverObject has any properties with
lazy="true",
returns an Object that stores the referencedId Arrays for
each lazily loaded property, using the property name as the
lookup key value. | Conflict | ||
| Method | Defined by | ||
|---|---|---|---|
|
Conflict(dataService:ConcreteDataService, errMsg:DataErrorMessage, resolver:ConflictResolver)
Constructs an instance of a Conflict based on the specified error
message
| Conflict | ||
|
Requeues the current local changes and updates the property values such
that a subsequent call to
DataService.commit() should
succeed, causing these changes to override the previous ones. | Conflict | ||
|
Removes the conflicting local change and applies the property values
found on
Conflict.serverObject to the local item. | Conflict | ||
![]() |
Indicates whether an object has a specified property defined.
| Object | |
![]() |
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 | |
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
| Conflict | |||
![]() |
Returns the primitive value of the specified object.
| Object | |
| cause | property |
cause:DataMessage [read-only]
Returns the DataMessage that caused the conflict.
public function get cause():DataMessage
| clientObject | property |
clientObject:Object [read-only]Returns the state of the client object (whose property was changed) at the time of the conflict.
Implementation public function get clientObject():Object
| destination | property |
destination:String [read-only]Returns the destination for the data service of the item involved in this conflict.
Implementation public function get destination():String
| originalObject | property |
originalObject:Object [read-only]Returns the state of the original client object before its properties were changed, as known at the time of the conflict.
Implementation public function get originalObject():Object
| propertyNames | property |
propertyNames:Array [read-only]
Returns an Array of the names of the properties that were
in conflict between the client change and the remote item state.
All property names are String values and exist in the
public namespace.
public function get propertyNames():Array
| resolved | property |
resolved:Boolean [read-only]
Indicates whether this Conflict has been resolved
(acceptClient() or acceptServer() has been
called).
public function get resolved():Boolean
See also
| serverObject | property |
serverObject:Object [read-only]Returns the value of server object whose property was to be changed.
Implementation public function get serverObject():Object
| serverObjectReferencedIds | property |
serverObjectReferencedIds:Object [read-only]
If the serverObject has any properties with lazy="true",
returns an Object that stores the referencedId Arrays for
each lazily loaded property, using the property name as the
lookup key value.
public function get serverObjectReferencedIds():Object
| Conflict | () | constructor |
public function Conflict(dataService:ConcreteDataService, errMsg:DataErrorMessage, resolver:ConflictResolver)Constructs an instance of a Conflict based on the specified error message
ParametersdataService:ConcreteDataService |
|
errMsg:DataErrorMessage |
|
resolver:ConflictResolver |
| acceptClient | () | method |
public function acceptClient():void
Requeues the current local changes and updates the property values such
that a subsequent call to DataService.commit() should
succeed, causing these changes to override the previous ones.
private function conflictHandler(event:DataConflictEvent):void
{
if (acceptClientCheck.selected)
{
event.conflict.acceptClient();
}
else
{
event.conflict.acceptServer();
}
}
| acceptServer | () | method |
public function acceptServer():void
Removes the conflicting local change and applies the property values
found on Conflict.serverObject to the local item.
private function conflictHandler(event:DataConflictEvent):void
{
if (acceptClientCheck.selected)
{
event.conflict.acceptClient();
}
else
{
event.conflict.acceptServer();
}
}
| toString | () | method |