This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Custom Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Custom Tag" Watch "Custom Tag" New topic
Author

Custom Tag

Amol Umrani
Ranch Hand

Joined: Jun 21, 2006
Posts: 36
Can any one explain me types of attributes.
I am Preparing for exam.
But i am still confuse about this.
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
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")%>
Pallavi Roy
Ranch Hand

Joined: Jun 01, 2006
Posts: 37
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


Break the ice - SCJP 1.4,<br />Where There's a will- SCWCD 1.4.<br />Back in action - Websphere Certified Portal 6 Application Developer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom Tag
 
Similar Threads
Word Games
are you guys all aquiver?
Who am I?
design question
Completed SCEA(II/III) . i.e. Now all 4 Sun Java Certifications are complete.