• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Dynamic attribute

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<dynamic-attributes>true</dynamic-attributes> must be present in TLD.
For further information click Dynamic Attributes
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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)
 
muthu moorthy
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you gowher & rohit
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic