| パッケージ | 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 |
MXML シンタックスを隠す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)
新しい RemoteObject を作成します。 | RemoteObject | ||
![]() |
サービスのネットワーク接続を切断して、保留されている要求のすべての応答側を削除します。 | AbstractService | |
[オーバーライド]
指定された名前の Operation を返します。 | RemoteObject | ||
![]() |
サービスを初期化するために呼び出されます。 | AbstractService | |
RemoteObject がタグを使用して設定されている場合、MXML コンパイラーによって自動的に呼び出されます。 | RemoteObject | ||
![]() |
ユーザーを宛先からログアウトします。 | AbstractService | |
![]() |
サーバー側で Data Services を使用している場合にサービスがアクセスする宛先の資格情報を設定します。 | AbstractService | |
![]() | [オーバーライド]
リモートオブジェクトが ColdFusion Component(CFC)などの外部サービスで管理されている場合、そのリモートサービスの認証メカニズムに対するユーザー名とパスワードを設定することができます。 | RemoteObject | |
![]() |
RemoteObject のインスタンスを、宛先 ID や割り当てられたチャネルのセットなどの重要なプロパティを記述するストリングとして表します。 | RemoteObject | |
RemoteObject | () | コンストラクター |
getOperation | () | メソッド |
override public function getOperation(name:String):AbstractOperation| 言語バージョン: | ActionScript 3.0 |
| 製品バージョン: | Flex 3 |
| ランタイムバージョン: | Flash Player 9, AIR 1.1 |
指定された名前の Operation を返します。Operation が事前に作成されなかった場合、新しい mx.rpc.remoting.mxml.Operation がこの呼び出し中に作成されます。 Operation は通常、その名前をサービス変数(myService.someOperation)の後に指定するだけでアクセスすることができますが、Operation 名がサービスに対して定義されているメソッドと一致している場合(例えば setCredentials)、代わりにこのメソッドを使って Operation を取得することができます。
パラメーター
name:String — Operation の名前です。
|
AbstractOperation — この名前に対して実行される Operation です。
|
initialized | () | メソッド |
public function initialized(document:Object, id:String):void| 言語バージョン: | ActionScript 3.0 |
| 製品バージョン: | Flex 3 |
| ランタイムバージョン: | Flash Player 9, AIR 1.1 |
RemoteObject がタグを使用して設定されている場合、MXML コンパイラーによって自動的に呼び出されます。 ActionScript によって RemoteObject を作成する場合、このメソッドはすべてのパラメーターを検証する際に役立つため、このメソッドを呼び出すことをお勧めします。
パラメーター
document:Object — この RemoteObject が存在する MXML ドキュメントです。
| |
id:String — ドキュメント内部でのこの RemoteObject の ID です。
|
<?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, 10:34 AM Z
MXML シンタックスを表示