• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

List attribute on Simple Tag Handler

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic