service - Service

Specifies the name of a service being exposed.

Category

basics

Syntax

<xe:this.service>
	<xe:servicename attributes>content</xe:servicename>
</xe:this.service>
Where xe:servicename is one of the following:
  • xe:calendarJsonLegacyService
  • xe:customRestService
  • xe:databaseCollectionJsonService
  • xe:documentJsonService
  • xe:jdbcQueryJsonService
  • xe:viewCollectionJsonService
  • xe:viewItemFileService
  • xe:viewJsonLegacyService
  • xe:viewJsonService
  • xe:viewXmlLegacyService

Each object has properties depending on its type. In the user interface, mouse over a property to get its description.

Usage

In Design mode, click All Properties and look for service under basics.

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>