Appendix E. Surf Quick Reference

The Surf platform lets you define objects to describe elements like pages, template instances, component bindings, and themes. These objects are consulted at delivery time to render views for your Spring Web application.

OBJECT DEFINITIONS

This appendix provides a guide for developers who wish to customize or build new Surf applications. This includes the customization or addition of new features to Alfresco Share.

The Surf object types are covered in detail. For each object type, sample code is provided to illustrate the XML structure required to define them as files on disk. The recommended locations for each file are also provided.

For more information on these APIs and future releases, please visit: http://www.springsurf.org

COMMON OBJECT PROPERTIES

All Surf objects share some properties in common. The following code shows the basic structure of a Surf object XML file. It has a single mandatory id field. The remainder of the properties are optional.

Surf objects provide support for internationalization for the title and description fields (using the title-id and description-id identifiers, respectively).

<object>

   <!-- mandatory id field -->
   <id>ID</id>
<!-- Optional title (direct or i18n) --> <title>TITLE</title> <title-id>TITLE-ID</title-id> <!-- Optional description (provided or i18n key) --> <description>DESCRIPTION</description> <description-id>DESCRIPTION-ID</description-id> <!-- Optional custom properties --> <properties> <CUSTOM_KEY>CUSTOM_VALUE</CUSTOM_KEY> ...

Get Professional Alfresco: Practical Solutions for Enterprise Content Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.