(28)S2Flex2画像パレット サービスクラスの実装
何を毎日書いてるかというと、S2Flex2+Cairngormで画像パレットを作ろうとしているのです。
今回はサービスクラスの紹介です。
■ImagePickerService.mxml
<cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:cairngorm="com.adobe.cairngorm.business.*" xmlns:s2="http://www.seasar.org/s2flex2/mxml" > <s2:S2Flex2Service id="imageService" destination="imagemanageService" gatewayUrl="http://localhost:8080/imagepicker/gateway" result="event.token.resultHandler( event );" fault="event.token.faultHandler( event );" showBusyCursor="true" /> </cairngorm:ServiceLocator>
ServiceLocator(のサブクラス)でS2Flex2Serviceインスタンスを生成しています。
imageServiceという(Seasar2)コンポーネントを指定するように定義しています。
ようやくサンプル作成の終わりが見えてきました。
次回は、Delegateクラスの作成です。