The Jakarta Project The Jakarta Slide Project

Main

Resources

User's Guide

Administrator's Guide

HOW-TOs

Programmer's Corner

Slide API

Reference

Slide Tags for JSTL

The Jakarta Slide project includes JSP tag libraries to support the creation of web-based presentation layers accessing and displaying content stored in Slide repositories.

To keep the tag library code lean, we have to decided to rely on existing tag libraries to support basic functionality like iteration and conditionals. Two such libraries are currently supported: Struts 1.x and the JSP Standard Tag Library (JSTL) Early Access releases. The Slide tag library cannot effectively be used on its own, but requires one of the above fundamental libraries.

The tag library for the JSP Standard Tag Library (JSTL) provides many tags for building a web interface to Slide. These tags are designed to integrate well with the tags and expression language support provided by JSTL.

For more information on JSTL see http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html.

WARNING: This tag library should be considered experimental and might undergo some drastic changes in the future.

Tag NameDescription
domain Expose the Slide domain as bean.
namespace Expose a specific Slide namespace as bean.
node Expose a particular ObjectNode in the Slide namespace as bean.
revision Expose a revision-descriptor of an ObjectNode as bean.
content Retrieve the content of a node.
property Expose a property of a node as bean.
domain - Expose the Slide domain as bean.

The main purpose of this tag is to provide means to iterate over the list of defined namespaces.

The DomainBean exposed by this tag provides the following properties:

  • defaultNamespace: a NamespaceBean that represents the domain's default namespace
  • defaultNamespaceName: the name of the domain's default namespace
  • namespaces: a collection of all the domain's namespaces as NamespaceBean objects
  • namespaceNames: a collection of the names of all the defined namespaces
The bean is only exposed inside the body of the domain tag.

Attribute NameDescription
var

Specifies the name of the page scope attribute under which the DomainBean will be made available.

[Required]
namespace - Expose a specific Slide namespace as bean.

This tag lets you select the namespace that should be accessed.

The namespace tag can optionally expose a NamespaceBean that has the following properties:

  • name: the name of the namespace
  • usersPath: the path at which user nodes are stored
The bean is only exposed inside the body of the namespace tag.

Attribute NameDescription
var

Specifies the name of the page scope attribute under which the NamespaceBean will be made available.

name

Specifies the name of the namespace that should be accessed.

[Required]
node - Expose a particular ObjectNode in the Slide namespace as bean.

The node tag lets you access a particular ObjectNode of a Slide namespace. You have to specify the URI of the node that should be accessed.

This tag can optionally expose a NodeBean with the following properties:

  • branches: a collection of the names of the branches that exist for the node
  • children: a collection of the children of the node as NodeBean objects
  • hasChildren: whether the node has children
  • hasRevisions: whether the node has revisions
  • isLocked: whether the node is locked
  • isVersioned: whether the node is versioned
  • locks: a collection of active locks on the node as LockBean objects
  • name: the leaf name of the node
  • parent: the parent node as NodeBean
  • permissions: a collection of permissions defined for the node as PermissionBean objects
  • revisions: a collection of revisions of the node as RevisionBean objects
  • initialRevision: the initial revision of the node as RevisionBean
  • latestRevision: the latest revision of the node as RevisionBean
  • roles: a collection of the names of the roles the node has
  • type: the type of the node as string
  • uri: the node's URI
The bean is only exposed inside the body of the node tag.

Attribute NameDescription
var

Specifies the name of the page scope attribute under which the NodeBean will be made available.

uri

Specifies the URI of the node to access.

[Required]
resolveLinks

Specifies whether links should be resolved when retrieving the node.

revision - Expose a revision-descriptor of an ObjectNode as bean.

The revision tag lets you access a specific revision of a node, either identified by the version number or the branch name. It must be nested inside a node tag.

This tag can optionally expose a RevisionBean with the following properties:

  • branch: the name of the branch the revision belongs to
  • number: the version number of the revision
  • properties: a collection of properties of the revision as PropertyBean objects
The bean is only exposed inside the body of the revision tag.

Attribute NameDescription
var

Specifies the name of the page scope attribute under which the RevisionBean will be made available.

number

Specifies the version number of the revision to retrieve.

branch

Specifies the branch name of the revision to retrieve.

content - Retrieve the content of a node.

Using the content tag, you have access to the actual content of a node (or a particular revision of a node).

If you provide the 'var' attribute, the content will be exposed as a String in the page context. Alternatively, you can specify the 'varReader' attribute, so that the content is made available as a java.io.Reader object. If none of these two are specified, the content will be printed to the output stream.

Attribute NameDescription
var

Specifies the name of the page scope attribute under which the content will be made available as String.

varReader

Specifies the name of the page scope attribute under which the content will be made available as java.io.Reader.

property - Expose a property of a node as bean.

This tag lets you access a specific property of a node or node revision. It must be nested inside a node or revision tag.

If you provide the 'id' attribute, the property tag will expose a PropertyBean with the following attributes:

  • name: the name of the property
  • namespace: the namespace of the property
  • value: the value of the property as string
The bean is only exposed inside the body of the property tag.

Attribute NameDescription
var

Specifies the name of the page scope attribute under which the PropertyBean will be made available.

namespace

Specifies the namespace of the property.

name

Specifies the name of the property.


Copyright © 1999-2001, Apache Software Foundation