10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Encapsulating Reusable Content UsingTag Files<br />

234<br />

DeclaringTags<br />

<strong>The</strong> tag directive is similar to the JSP page’s page directive but applies to tag files. Some of the<br />

elements in the tag directive appear in the tag element of a TLD (see “Declaring Tag Handlers”<br />

on page 249). Table 8–2 lists the tag directive attributes.<br />

TABLE 8–2 tag Directive Attributes<br />

Attribute Description<br />

display-name (optional) A short name that is intended to be displayed by tools. Defaults to the<br />

name of the tag file without the extension .tag.<br />

body-content (optional) Provides information on the content of the body of the tag. Can be either<br />

empty, tagdependent,orscriptless. A translation error will result if JSP or any<br />

other value is used. Defaults to scriptless. See “body-content Attribute” on<br />

page 235.<br />

dynamic-attributes (optional) Indicates whether this tag supports additional attributes with dynamic<br />

names. <strong>The</strong> value identifies a scoped attribute in which to place a Map containing the<br />

names and values of the dynamic attributes passed during invocation of the tag.<br />

A translation error results if the value of the dynamic-attributes of a tag directive<br />

is equal to the value of a name-given of a variable directive or the value of a name<br />

attribute of an attribute directive.<br />

small-icon (optional) Relative path, from the tag source file, of an image file containing a small<br />

icon that can be used by tools. Defaults to no small icon.<br />

large-icon (optional) Relative path, from the tag source file, of an image file containing a large<br />

icon that can be used by tools. Defaults to no large icon.<br />

description (optional) Defines an arbitrary string that describes this tag. Defaults to no<br />

description.<br />

example (optional) Defines an arbitrary string that presents an informal description of an<br />

example of a use of this action. Defaults to no example.<br />

language (optional) Carries the same syntax and semantics of the language attribute of the<br />

page directive.<br />

import (optional) Carries the same syntax and semantics of the import attribute of the page<br />

directive.<br />

pageEncoding (optional) Carries the same syntax and semantics of the page-Encoding attribute in<br />

the page directive.<br />

isELIgnored (optional) Carries the same syntax and semantics of the isEL-Ignored attribute of<br />

the page directive.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!