(Adobe® Flex™ Data Services 2 only)
Packagemx.data
Classpublic class Conflicts

The Conflicts class represents a list of conflicts. When conflicts are detected between changes made by a client and those made on the server, a Conflict object is created for each item which contains both the client and server versions of the data involved in that item at any given time. You cannot commit any changes until all conflicts are resolved. At that point, the DataService.commit() method will call remove all of these conflicts. If you attempt to resolve a Conflict which was already resolved, an error is thrown. An instance of this class can be accessed from the DataService.conflicts property. Because this class implements IList it can be used with an ArrayCollection.list property. Allowing it to participate as a data source for UI controls and data binding.



Public Properties
 PropertyDefined by
  resolved : Boolean
[write-only] Indicates if there are any unresolved conflicts in the list.
Conflicts
Public Methods
 MethodDefined by
  
Conflicts
  
This is a convience method that iterates all of the conflicts within this list and invokes the Conflict.acceptClient() method.
Conflicts
  
This is a convience method that iterates all of the conflicts within this list and invokes the Conflict.acceptClient() method.
Conflicts
Property detail
resolvedproperty
resolved:Boolean  [write-only]

Indicates if there are any unresolved conflicts in the list. When this returns true all conflicts have been resolved and DataService.commit() can be called without an error.

This property can be used as the source for data binding.

Implementation
    public function set resolved(value:Boolean):void
Constructor detail
Conflicts()constructor
public function Conflicts()
Method detail
acceptAllClient()method
public function acceptAllClient():void

This is a convience method that iterates all of the conflicts within this list and invokes the Conflict.acceptClient() method. Once completed this method will clear all of the conflicts in the list. Calling this method will requeue each local change and update all property values such that a subsequent call to DataService.commit() should succeed, allowing these changes to override the current ones.

See also

acceptAllServer()method 
public function acceptAllServer():void

This is a convience method that iterates all of the conflicts within this list and invokes the Conflict.acceptClient() method. Once completed this method will clear all of the conflicts in the list. Calling this method removes the conflicting local change and applies the property values found on each Conflict.serverObject within the list to each related local item.

See also





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/2/langref/mx/data/Conflicts.html