• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jakarta Custom Tags

 
Sandep Chaturvedi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use custom tags from Apache. The input tag "select" expects both key/value in the hashmap as string. I have a reusable library which returns this as object/object pair (it can be string or int). How do I customize the custom tag without modifying the reusable component.
Any help will be appriciated.
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you could just arrange to call .toString() on whatever you get out - if the values you get are guaranteed to be int or string you could save time by just accounting for those two scenarios but if yo uwant it to be totaly generic you can use reflection to check the type of the return value and to use this type to get a string out of it using
Integer.toString(int)
Double.toString(double)
etc
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!