패키지 | mx.rpc.remoting.mxml |
클래스 | public dynamic class RemoteObject |
상속 | RemoteObject RemoteObject AbstractService Proxy |
구현 | IMXMLSupport, IMXMLObject |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The <mx:RemoteObject> tag accepts the following tag attributes:
<mx:RemoteObject Properties concurrency="multiple|single|last" destination="No default." id="No default." endpoint="No default." showBusyCursor="false|true" source="No default." (currently, Adobe ColdFusion only) makeObjectsBindable="false|true" Events fault="No default." result="No default." />
<mx:RemoteObject> can have multiple <mx:method> tags, which have the following tag attributes:
<mx:method Properties concurrency="multiple|single|last" name="No default, required." makeObjectsBindable="false|true" Events fault="No default." result="No default." />
It then can have a single <mx:arguments> child tag which is an array of objects that is passed in order.
메서드 | 정의 주체 | ||
---|---|---|---|
RemoteObject(destination:String = null)
Create a new RemoteObject. | RemoteObject | ||
Disconnects the service's network connection and removes any pending
request responders. | AbstractService | ||
[재정의]
Returns an Operation of the given name. | RemoteObject | ||
Called to initialize the service. | AbstractService | ||
Called automatically by the MXML compiler if the RemoteObject is set up using a tag. | RemoteObject | ||
Logs the user out of the destination. | AbstractService | ||
Sets the credentials for the destination accessed by the service when using Data Services on the server side. | AbstractService | ||
[재정의]
If a remote object is managed by an external service, such a ColdFusion Component (CFC),
a username and password can be set for the authentication mechanism of that remote service. | RemoteObject | ||
Represents an instance of RemoteObject as a String, describing
important properties such as the destination id and the set of
channels assigned. | RemoteObject |
RemoteObject | () | 생성자 |
getOperation | () | 메서드 |
override public function getOperation(name:String):AbstractOperation
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Returns an Operation of the given name. If the Operation wasn't
created beforehand, a new mx.rpc.remoting.mxml.Operation
is
created during this call. Operations are usually accessible by simply
naming them after the service variable
(myService.someOperation
), but if your Operation name
happens to match a defined method on the service
(like setCredentials
), you can use this method to get the
Operation instead.
매개 변수
name:String — Name of the Operation.
|
AbstractOperation — Operation that executes for this name.
|
initialized | () | 메서드 |
public function initialized(document:Object, id:String):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Called automatically by the MXML compiler if the RemoteObject is set up using a tag. If you create the RemoteObject through ActionScript you may want to call this method yourself as it is useful for validating any arguments.
매개 변수
document:Object — the MXML document on which this RemoteObject lives
| |
id:String — the id of this RemoteObject within the document
|
<?xml version="1.0" encoding="utf-8"?> <!-- Simple example to demonstrate the RemoteObject tag. --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <!-- Make sure the Flex Data Services proxy-config.xml file contains the following definition. The Java class mypackage.stockquote.MyTicker.class must be available on the web application's classpath. <destination id="MyRemoteObjectDest"> <properties> <source>mypackage.stockquote.MyTicker</source> <scope>application</scope> </properties> </destination> --> <fx:Script> <![CDATA[ import mx.controls.Alert; ]]> </fx:Script> <fx:Declarations> <mx:RemoteObject id="RO" destination="MyRemoteObjectDest" fault="Alert.show(event.fault.faultString), 'Error'"> <mx:method name="GetQuote"> <mx:arguments> <symbol>{stockSymbol.text}</symbol> </mx:arguments> </mx:method> </mx:RemoteObject> </fx:Declarations> <mx:Panel title="RemoteObject Example" height="75%" width="75%" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"> <mx:Label width="100%" color="blue" text="Enter a stock symbol to obtain a quote."/> <mx:TextInput id="stockSymbol" text="ADBE"/> <mx:Button label="Get Quote" click="RO.GetQuote.send()"/> <mx:Text htmlText="Company: {RO.GetQuote.lastResult.GetQuoteResult.StockQuote.Company}"/> <mx:Text htmlText="Current price: ${RO.GetQuote.lastResult.GetQuoteResult.StockQuote.Price}"/> </mx:Panel> </s:Application>
Tue Jun 12 2018, 03:17 PM Z