• 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

getValues in TagSupport

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody tell me what will be returned by the getValues in TagSupport class. This method does not take any argument. So will it return an enumeration of all values set using setValue methods. Kindly clarify
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TagSupport has an internal Map storage that you can use. You can add Objects to that Map that you may need in your processing but, don't want to make a variable with getters and setters for. To add it you call the setValue(String, Object) To get it, you can call getValue(String) and as with all Map's you can get all the Keys that where added to the Map you use getValues() This returns an Enumertion of the Keys to the Map (Kind of a misleading name, should be getValueKeys()).
This is useful when you need to have access in a child tag to an Object in a parent Tag but, don't want to have it available outside the Tags life cycle.
 
Let me tell you a story about a man named Jed. He made this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic