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.
posted 14 years ago
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
chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>