Blazeds/Puremvcと共有VOS
-
30-09-2019 - |
質問
共通VO:ShopregionVoこのVOを共有する2つのモジュールを使用してモジュラーアプリケーションを構築しています。このVOは、Blazedsエンティティであり、リモートJavaオブジェクトにマッピングされています。シェルが最初のモジュールをロードすると、すべてが問題ありません。 2番目のモジュールはShopregionVosのリストであり、アイテムの変更は次のコードで処理されます。
sendNotification(CoverageConstants.SET_SELECTED_REGION_COMMAND, ShopRegionVO(List(e.target).selectedItem));
例外はここでスローされます:
Main Thread (Suspended: Error #1034: Type Coercion failed: cannot convert model.vo::ShopRegionVO@14961809 to model.vo.ShopRegionVO.)
view.list::RegionListMediator/onChange
flash.events::EventDispatcher/dispatchEventFunction [no source]
flash.events::EventDispatcher/dispatchEvent [no source]
mx.core::UIComponent/dispatchEvent
mx.controls.listClasses::ListBase/mouseUpHandler
mx.controls::List/mouseUpHandler
ShopRegionVoは、モジュール間で共有されている個別のFlexライブラリにあります。
package model.vo
{
[Bindable]
[RemoteClass(alias="com.abc.RegionVO")]
public class ShopRegionVO
{
public var name : String;
public var id : int;
public function ShopRegionVO(_id:int=0, _name : String=null)
{
super();
// init properties
name = _name;
id = _id;
}
}
}
解決
これが解決策です:
所属していません StackOverflow