• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Custom Tag

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one explain me types of attributes.
I am Preparing for exam.
But i am still confuse about this.
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
request time expressions and constant values are the two types of attributes which can be used for using request time attributes rtexprvalue under attribute tag should be set to true.The value can be specified at request time in that case like <%= request.getParameter("name1")%>
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Amol,

When you are using attributes in your custom tag then there are two possible ways by which you can use attributes.

a) In your TLD file you mention :
<attribute>
<name>num</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>

b) And for attributes which you want to mention dynamically(for example the names of attributes you are not sure)then go ahead and make this declaration:

<dynamic-attributes>true</dynamic-attributes>
Then you have to implement the DynamicAttributes interface in you tag handler class.And also implement the method setDynamicAttribute(String uri,String localName,Object value)

There is a very good article for dynamic-attributes in SCWCD faq or JSP faq not sure.check it out for more clarity.

Best Regards,
Pallavi
 
Normally trees don't drive trucks. Does this tiny ad have a license?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic