我有问题。从数据服务中,我收到具有相同标识的行,并且它在运行时使我的应用程序崩溃并出现以下错误:
Error: Collection result contains a duplicate item: SalesPro.Duplicates:#:1 exists at both position: 0 and 1
at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequence()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\pro jects\data\src\mx\data\DataList.as:2697]
at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequenceResult()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\pro jects\data\src\mx\data\DataList.as:2948]
at mx.data::DataListRequestResponder/result()[C:\depot\DataServices\bran ches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\DataLi stRequestResponder.as:102]
at mx.rpc::AsyncRequest/acknowledge()[/Users/justinmclean/Documents/Apac heFlex4.10/frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as:92]
at NetConnectionMessageResponder/resultHandler()[/Users/justinmclean/Doc uments/ApacheFlex4.10/frameworks/projects/rpc/src/mx/messaging/channel s/NetConnectionChannel.as:560]
at mx.messaging::MessageResponder/result()[/Users/justinmclean/Documents /ApacheFlex4.10/frameworks/projects/rpc/src/mx/messaging/MessageRespon der.as:243]
我怎样才能捕捉到这个错误?
code:
var params:Object = {
Session_ID: SecurityManager.sessionID
};
resultArr = DataController.getData("MainView", "SalesPro.Duplicates", "all", params, false, resultHandler, faultHandler);
得到结果后写入 ArrayCollection 时出现此错误。在此错误之后调用结果事件处理程序。