O'Reilly logo

Professional Alfresco: Practical Solutions for Enterprise Content Management by Kevin Roast, Michael G. Uzquiano, Michael Farman, John Newton, David Caruana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required