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

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

The attributes of the template-definition object, in addition to the attributes inherited from the FrameworkObject base class, are:

Attribute

Description

other-context

The Web context for rendering content from other Web applications.

template-id

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

url

A URL that references the JSP template.

The extension method of the TemplateDefinitionHome interface is:

Returns

Method

Description

TemplateDefinition

findByUserSegment
  AndTemplateId

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.

Arguments: String appId, String templateId

The following is a template-definition:

<template-definition>
  <id>SimpleLinksEveryonePanelTemplate</id>
  <app-id>workspace</app-id>
  <enabled-yn>true</enabled-yn>
  <object-type>TemplateDefinition</object-type>
  <template-id>simpleLinksPanel</template-id>
  <url>/skins/templates/simpleLinksPanelTemplate.jsp</url>
</template-definition>

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices