適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: 從伺服器擷取資料...
從伺服器擷取資料...
mx.data 

Conflicts  - AS3 ADEP Data Services

套件mx.data
類別public class Conflicts
繼承Conflicts Inheritance ArrayList Inheritance EventDispatcher Inheritance Object

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

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 user interface controls and data binding.

預設 MXML 屬性source



公用屬性
 屬性定義自
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
  length : int
[覆寫] [唯讀] The length of the source Array.
Conflicts
  resolved : Boolean
[唯讀] Indicates if there are any unresolved conflicts in the list.
Conflicts
  source : Array
[覆寫] An Array of Conflict objects.
Conflicts
 Inheriteduid : String
Provides access to the unique id for this list.
ArrayList
公用方法
 方法定義自
  
Conflicts(dataService:ConcreteDataService = null)
Constructor.
Conflicts
  
This is a convenience method that iterates all of the conflicts within this list and invokes the Conflict.acceptClient() method.
Conflicts
  
This is a convenience method that iterates all of the conflicts within this list and invokes the Conflict.acceptClient() method.
Conflicts
 Inherited
addAll(addList:IList):void
Adds a list of items to the current list, placing them at the end of the list in the order they are passed.
ArrayList
 Inherited
addAllAt(addList:IList, index:int):void
Adds a list of items to the current list, placing them at the position index passed in to the function.
ArrayList
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
EventDispatcher
 Inherited
Add the specified item to the end of the list.
ArrayList
 Inherited
addItemAt(item:Object, index:int):void
Add the item at the specified index.
ArrayList
 Inherited
會將事件傳送到事件流程。
EventDispatcher
  
If there is an outstanding conflict for the given object, returns that conflict.
Conflicts
 Inherited
getItemAt(index:int, prefetch:int = 0):Object
Get the item at the specified index.
ArrayList
 Inherited
Return the index of the item if it is in the list such that getItemAt(index) == item.
ArrayList
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
EventDispatcher
 Inherited
指出物件是否有已定義的指定屬性。
Object
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
 Inherited
itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void
Notify the view that an item has been updated.
ArrayList
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
  
raiseConflict(dataManager:DataManager, cause:DataMessage, serverObject:Object, conflictingProperties:Array):void
This method is used by the DataServiceAdapter implementation when it need to raise a conflict because a change is in conflict with the server version.
Conflicts
 Inherited
Remove all items from the list.
ArrayList
  
Removes all resolved conflicts from this collection.
Conflicts
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
會從 EventDispatcher 物件移除偵聽程式。
EventDispatcher
 Inherited
Removes the specified item from this list, should it exist.
ArrayList
 Inherited
Remove the item at the specified index and return it.
ArrayList
 Inherited
setItemAt(item:Object, index:int):Object
Place the item at the specified index.
ArrayList
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
 Inherited
Return an Array that is populated in the same order as the IList implementation.
ArrayList
 Inherited
傳回代表此物件的字串,根據地區特定慣例進行格式化。
Object
  
[覆寫] Returns a String representation of this Conflicts object.
Conflicts
 Inherited
會傳回指定之物件的基本值。
Object
 Inherited
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。
EventDispatcher
保護方法
 方法定義自
 Inherited
Called when any of the contained items in the list dispatch an ObjectChange event.
ArrayList
 Inherited
If the item is an IEventDispatcher, watch it for updates.
ArrayList
 Inherited
If the item is an IEventDispatcher, stop watching it for updates.
ArrayList
事件
 事件 摘要 定義自
 Inherited[廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。EventDispatcher
 InheritedDispatched when the IList has been updated in some way.ArrayList
 Inherited[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。EventDispatcher
屬性詳細資訊

length

屬性
length:int  [唯讀] [覆寫]

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

The length of the source Array.

此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 collectionChange 事件。



實作
    override public function get length():int

resolved

屬性 
resolved:Boolean  [唯讀]

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

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.

此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange 事件。



實作
    public function get resolved():Boolean

source

屬性 
source:Array[覆寫]

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

An Array of Conflict objects.



實作
    override public function get source():Array
    override public function set source(value:Array):void
建構函式詳細資料

Conflicts

()建構函式
public function Conflicts(dataService:ConcreteDataService = null)

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Constructor.

參數
dataService:ConcreteDataService (default = null) — The DataService that caused the conflict.
方法詳細資訊

acceptAllClient

()方法
public function acceptAllClient():void

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

This is a convenience 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.

相關 API 元素

acceptAllServer

()方法 
public function acceptAllServer():void

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

This is a convenience 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.

相關 API 元素

getConflict

()方法 
public function getConflict(item:Object):Conflict

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

If there is an outstanding conflict for the given object, returns that conflict. Otherwise, returns null.

參數

item:Object — The object to check for conflicts.

傳回值
Conflict — A Conflict object if there is a conflict, and null otherwise.

raiseConflict

()方法 
public function raiseConflict(dataManager:DataManager, cause:DataMessage, serverObject:Object, conflictingProperties:Array):void

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

This method is used by the DataServiceAdapter implementation when it need to raise a conflict because a change is in conflict with the server version.

參數

dataManager:DataManager — The DataManager instance.
 
cause:DataMessage — The DataMessage object that caused the conflict. The cause should be the pending change which is in conflict with the server.
 
serverObject:Object — The value of the server object whose property was to be changed.
 
conflictingProperties:Array — 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.

removeAllResolved

()方法 
public function removeAllResolved():void

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Removes all resolved conflicts from this collection.

toString

()方法 
override public function toString():String

語言版本: ActionScript 3.0
產品版本: Adobe Digital Enterprise Platform Data Services for Java EE 3
執行階段版本: Flash Player 9, AIR 1.1

Returns a String representation of this Conflicts object.

傳回值
String — A String representation of this Conflicts object.




[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。