This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Dynamic attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Dynamic attribute" Watch "Dynamic attribute" New topic
Author

Dynamic attribute

muthu moorthy
Ranch Hand

Joined: Dec 19, 2006
Posts: 87
<dynamic-attribute>true</dynamic-attribute>

The above declaration should be declared in DD or TLD ?

The above doubt arised to me when i do the mock exam of the 10 th chapter (Custom tag developement) in HF.

The question is :
Which must be true if you want to use dynamic attributes for a Simple Tag handler ?

The answer are :
B. Your Simple tag must use <dynamic-attributes> element in the TLD
C. Your Simple tag handler must implement the DynamicAttributes interface.

I get confused while i read Frederic notes which tells,

Two things are necessary to allow dynmic attributes in custom tags.
- Declare dynamic attributes in DD;
- Implement DynamicAttributes interface.

But, i dont find the detailed section on this dynamic attributes in HF Book.

It would be great if anybody could explain on this.

Thank you
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
<dynamic-attributes>true</dynamic-attributes> must be present in TLD.
For further information click Dynamic Attributes
Rohitt Vermaa
Ranch Hand

Joined: Oct 12, 2006
Posts: 232

This is how the dynamic-attribute should be used in tld.
The simple tag handler must implement the DynamicAttributes interface. the only method in this interface is:
void setDynamicAttribute(String uri, String localName, Object value)


SCJP ,SCWCD
muthu moorthy
Ranch Hand

Joined: Dec 19, 2006
Posts: 87
Thank you gowher & rohit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic attribute
 
Similar Threads
Custom Tag
Tutorial on Dynamic Attributes
Dynamic Attibutes
DynamicAttributes interface
Example of Dynamic attribute in Custom Tag