I'm working on an experimental tag library that is an extension of Struts,
where all the tags use the JSTL EL evaluator instead of using RT expressions.

In general, the subclasses will be quite simple boilerplate code, just
requiring calls to "ExressionUtil.evalNotNull()" for each attribute that used
to be an "rt" expression.

I've noticed one wrinkle, however.  I'm implementing the Struts "bean:size"
tag, which has a "collection" attribute.  In most cases, each Struts tag
attribute can be only one type.  However, the "collection" attribute of the
"bean:size" tag can be either a "Map", "Collection", or an array of any type.
I don't see an easy way to do this with the ExpressionUtil class, or even with
the classes it uses (ExpressionEvaluatorManager and ExpressionEvaluator).

I suppose I could just use "Object.class", as the base "SizeTag" class
validates the type of the expression.  What I'm unsure of, however, if whether
specifying "Object.class" will work, allowing the specification of either a
Map, Collection, or Array in the attribute EL expression.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to