PDA

View Full Version : How to retrieve a java.util.List from a custom tag


cash1981
07-10-2007, 04:31 PM
Hello. I have created my own tag and I can manage to retrieve Strings, Int's and doubles easily. But I have no idea how I can retrieve a List.

I know it should be possible.
I can show the code for retrieving strings.

For instance <customtag:something profile="Sometext" list=${someList} or maybe I have to send it in as list=<%someList%>
I'm not sure yet.

And to retrieve it I use:

String profile = ExpressionEvaluatorManager.evaluate(attributeName, expression, expectedType, tag, pageContext);

But ExpressionEvaluatorManager doesnt have object to evaluate. At least what I know. Has anybody done this before?
Another solution could be to put the list in an attribute, and just say getAttribute and retrieve in my tag code, but I would like to do it this way first.