Exposes a REST service.
Syntax
<xe:restService attributes>content</xe:restService>
Table 1. Essential properties
| Property |
Description |
| id |
Defaults to restService1, restService2,
and so on. |
| pathInfo |
Identifies the location of the service
relative to the XPage. |
| service |
The service being exposed. |
Table 2. All properties
| Category |
Properties |
| basics |
binding, id, ignoreRequestParams, jsId, loaded, pathInfo, preventDojoStore, rendered, rendererType, service, state |
| styling |
disableTheme, themeId |
Examples
This example exposes a REST service
then uses a button to call the service and redirect its JSON output
to the local file system.<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>