article:define

Creates a scripting variable and a page-scoped bean from the specified article. The tag is similar to article:use, but unlike article:use does not set the current article.

Syntax
<article:define
   article="..."?
   articleId="..."?
   id="..."
   name="..."?
   property="..."?
   source="..."?
   sourceId="..."?
   toScope="..."?/>
Attributes
id, mandatory, no runtime expressions

Name of the scripting-variable we make.

toScope

Identify the JSP scope within which the PresentationArticle-bean will be created. If not specified, then the PresentaionArticle-bean is created in page scope.

Allowed values are:

article

A scriptlet that returns the required article.

Using this attribute excludes the use of the attributes articleId, name/property and source/sourceId.

articleId

An article id identifying the article to be defined. The value supplied can be an int, Integer or String.

Using articleId excludes the use of the attributes article, name/property and source/sourceId.

name

The name (key) of a bean from which a new bean/scripting variable is to be created.

There are two ways of using this bean:

Using this attribute excludes the use of the attributes article, articleId and source/sourceId.

property

The name of a bean property. This attribute is used together with the name attribute to locate an article from which a new bean/scripting variable is to be created. If name is specified but this attribute is not specified, then the bean identified by the name attribute will be used.

This attribute cannot be used without the name attribute.

source

The source of the article to define. This attribute must be used together with sourceId.

Using this attribute excludes the use of the attributes article, articleId and name/property.

sourceId

The source ID of the article to define. This attribute must be used together with source.

Using this attribute excludes the use of the attributes article, articleId and name/property.