File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes List attribute on Simple Tag Handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "List attribute on Simple Tag Handler" Watch "List attribute on Simple Tag Handler" New topic
Author

List attribute on Simple Tag Handler

stefania ferrarelli
Greenhorn

Joined: Jul 26, 2009
Posts: 29
Hi,
I try to make a List attribute on TLD of a Simple Tag but when I iterate over it, EL expressions show nothing.Any doubts:
-when I make the attribute I need to choose Object on netbeans :is it correct?


-is it correct to change the Object argument type of the default setter method to a List type ?


-the attribute is movieList but can I set another attribute - movie - on JspContext, regardless to TLD?


In general, can I set other attributes on JspContext() in addition to those declared on TLD? It is not clear to me what is my mistake...
Stefania

Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1638
    
  23

Hi Stefania,

Let me try to give you an answer:
-when I make the attribute I need to choose Object on netbeans :is it correct?

You can make it work, but you should use the type you are using (i.e. java.util.List)
-the attribute is movieList but can I set another attribute - movie - on JspContext, regardless to TLD?

No, you can't.

This won't work:

Attribute name invalid for tag Simple5 according to TLD

You are not setting an attribute but filling the body of the tag.

Regards,
Frits
 
 
subject: List attribute on Simple Tag Handler
 
Similar Threads
Custom tag does not render.
Setting bean in Simple tag attribute
Creating and populating a List of javaBeans in a JSP w/o using scriptlets
Help with custom tags
problem from HFSJ book