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.

DeferredValue<br />

A deferred value attribute is one that accepts deferred value expressions, which are described in<br />

“Value Expressions” on page 150.<br />

Deferred Method<br />

A deferred method attribute is one that accepts deferred method expressions, which are<br />

described in “Method Expressions” on page 154.<br />

Dynamic Attribute or Deferred Expression<br />

This kind of attribute can accept a String literal, a scriptlet expression, or an EL expression,<br />

including deferred expressions.<br />

jsp:attribute Element<br />

<strong>The</strong> jsp:attribute element allows you to define the value of a tag attribute in the body of an<br />

XML element instead of in the value of an XML attribute.<br />

For example, the Duke’s Bookstore template page screendefinitions.jsp uses<br />

jsp:attribute to use the output of fmt:message to set the value of the value attribute of<br />

tt:parameter:<br />

...<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

...<br />

jsp:attribute accepts a name attribute and a trim attribute. <strong>The</strong> name attribute identifies<br />

which tag attribute is being specified. <strong>The</strong> optional trim attribute determines whether or not<br />

white space appearing at the beginning and end of the element body should be discarded. By<br />

default, the leading and trailing white space is discarded. <strong>The</strong> white space is trimmed when the<br />

JSP page is translated. If a body contains a custom tag that produces leading or trailing white<br />

space, that white space is preserved regardless of the value of the trim attribute.<br />

An empty body is equivalent to specifying "" as the value of the attribute.<br />

Types ofTags<br />

Chapter 8 • CustomTags in JSP Pages 229

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

Saved successfully!

Ooh no, something went wrong!