• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

my understanding of dynamic attributes

 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :
https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where can we find documents on dynamic attributes?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've posted the link above.
You can also refer to the spec for more.
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic