I post this previously in Adobe Forum but haven't got any answers so far.
How do I do this in Flex 4?
<mx:RemoteObject id="srv" destination="product" channelSet="{channelSet}"
fault="faultHandler(event)">
<mx:method name="getProducts" result="getProducts_resultHandler(event)"/>
</mx:RemoteObject>
I got
Could not resolve
<s:Method>
to a component implementation.
When trying to do this
<s:RemoteObject id="roMajor"
destination="MajorSrv"
fault="Alert.show('Remote Object Error')" >
<s:Method name="AddMajor" result="roMajorResult(event)"/>
</s:RemoteObject>
Thank you
Move the
<RemoteObject/>
tag into<fx:Declarations>
tag:The following is taken from RIA Zone
So practically anything that is not displayable (that doesn't extend DisplayObject (or UIComponent to be more flex specific)), should be added to the
fx:Declarations
tag, not as the direct child of root tag.