The TemplateDefinition object defines templates for objects in the Service framework. Templates are JSP pages that define the page structure for a framework object. Any framework object has ability to define its own layout templates mapped by key. The following is a code example of importing a skin layout template:

<dspel:include page="${mySkin.templates.layoutTemplate.url}"/>

The attributes of the TemplateDefinition object, which are in addition to the attributes inherited from the FrameworkObject base class, are described below:

Attribute

Description

body

The body of the content being defined as an alternative to referencing the content by URL.

objectType

TemplateDefinition

templateId

Logical identifier that other objects use to refer to this object, which is exposed to other objects and to the code and which is the primary external way to refer to the object.

url

A URL that references the JSP template.

The extension methods of the TemplateDefinitionHome interface are described below:

Returns

Method

Description

TemplateDefinition

findByUserSegmentAndTemplateId

Arguments: String appId, String templateId

Returns the TemplateDefinition with the specified identifier based on the segment of the current user. If the current user does not have a segment or no object is found for the current segment, a default object is returned based on template identifier only. The appId indicates the framework application in which to look for the object.

 
loading table of contents...