Integration - Error: The synchronized type much have a property marked with the [SyncId] metadata.
Can't able to get integration library integrated with flex3 builder. What am I missing?
Flex 3
Main file: main.mxml
No other setting on flex compiler for metadata
libraries used:parsley-flex3-2.2.2.swc,spicelib-flex-2.2.2.swc,integration-flex 3-0.13.swc
Compiles well but throws the following error on runtime:
---------------------------------------------------------------------- ---------------------------------------------------------------------- ----
Cause(0): Initialization of ObjectDefinition for Class com.adobe.cairngorm.integration.data::DataCache failed - cause: Error: The synchronized type much have a property marked with the [SyncId] metadata.
at com.adobe.cairngorm.integration.data::DataCache/findIdentityProperty( )
at com.adobe.cairngorm.integration.data::DataCache/initialise()
at Function/http://adobe.com/AS3/2006/builtin::apply()
.....
[truncated]
---------------------------------------------------------------------- ---------------------------------------------------------------------- ----
AppContext.mxml
---------------------------------------------------------------------- ---------------------------------------------------------------------- ----
<?xml version="1.0" encoding="utf-8"?>
<mx:Object xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:data="com.adobe.cairngorm.integration.data.*" xmlns:domain="com.test.domain.*">
<data:DataCache type="com.test.domain.TestItem" />
</mx:Object>
main.mxml
---------------------------------------------------------------------- ---------------------------------------------------------------------- ----
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:spicefactory="http://www.spicefactory.org/parsley">
<mx:Script>
<![CDATA[
import com.test.domain.TestItem;
import org.spicefactory.parsley.core.messaging.ErrorPolicy;
private function init() : void {
new TestItem();
}
]]>
</mx:Script>
<spicefactory:ContextBuilder>
<spicefactory:FlexConfig type="{ AppContext }"/>
<spicefactory:Settings unhandledMessageErrors="{ErrorPolicy.RETHROW}"/>
</spicefactory:ContextBuilder>
<mx:Label text="Hello there!" />
</mx:Application>
TestItem.as
------------------
package com.test.domain
{
import mx.utils.ObjectUtil;
public class TestItem {
[SyncId]
public var id:int;
public var value:String;
public function toString():String
{
return ObjectUtil.toString(this);
}
}
}
