Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

my understanding of dynamic attributes

 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as the name suggest, uing dynamic attribute fature, we can set the attribut for any tag 'dynamically'. For example -

i have a custom font tag that accepts font size from the user, and displays the font in that size. in that case the attribute 'size' the tag <prefix:myfont size="this can be set dynamically"/>

am i i logically correct ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am i i logically correct ?

It sounds like you're misunderstanding the concept.
When you declare a tag in the tag library descriptor, you usually declare each attribute that the tag needs, using the "attribute" tag. However, sometimes you don't want to declare those attributes, and you want to be able to read any attributes passed to the tag.

If you declare myfont tag to use dynamic attributes, you can pass it any attributes, anything you want:
<prefix:myfont size="2" name="Niranjan" anotherAttr="blabla"/>


You can read a tutorial on Dynamic Attributes here :
http://www.coderanch.com/t/170429/java-Web-Component-SCWCD/certification/Tutorial-Dynamic-Attributes
[ November 07, 2006: Message edited by: Satou kurinosuke ]
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh...so its all about passing more attributes, ratehr than passing the attribute values dynamically (as i was misuderstandig).

i do have the tutorial with me, but i was just making some guess, based on the name.

and now that i made mistake in understading it, i will remember it better

thanks
 
Akshay Singhvi
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where can we find documents on dynamic attributes?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've posted the link above.
You can also refer to the spec for more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic