service - サービス

公開されるサービスの名前を指定します。

カテゴリ

basics

構文

<xe:this.service>
	<xe:servicename attributes>content</xe:servicename>
</xe:this.service>
ここで、xe:servicename は以下のいずれかです。

各オブジェクトには、そのタイプに応じたプロパティがあります。ユーザーインターフェースでプロパティにマウスを合わせると、そのプロパティの説明が表示されます。

使用法

設計モードで、[すべてのプロパティ] をクリックし、[basics] の下の [service] を探します。

以下の例は、REST サービスを公開した後、ボタンを使用してサービスを呼び出し、その JSON 出力をローカルファイルシステムにリダイレクトします。
<xe:restService id="restService1" pathInfo="dbPathInfo">
	<xe:this.service>
	<xe:databaseCollectionJsonService></xe:databaseCollectionJsonService></xe:this.service>
</xe:restService>
<xp:button id="button1" value="Database Collection">
	<xp:eventHandler event="onclick" submit="true">
		<xp:this.action><![CDATA[#{javascript:
	facesContext.getExternalContext().getResponse().sendRedirect(@FullUrl("restService.xsp/dbPathInfo"))
	}]]></xp:this.action>
	</xp:eventHandler>
</xp:button>