previous
|
index
|
next
Dynamic Tag Attributes
Dynamic attributes can be used if either:
Developer does not want to code setter methods and TLD attribute entries
A tag does not have a predefined set of valid attributes
Example: here is a tag element
dynamicAttribute
that declares its attributes to be dynamic:
<tag> element with dynamic attributes
Instead of having setters, code class must implement the
javax.servlet.jsp.tagext.DynamicAttributes
interface
Here is a tag class that implements
DynamicAttributes
and simply iterates through its tag's dynamic attributes:
DynamicAttributeTag.java
A JSP that defines a couple of dynamic tags:
DynamicAttributeTagTest.jsp
http://redrock.d.umn.edu:8082/.../DynamicAttributeTagTest.jsp
previous
|
index
|
next