> JSPTL allows you to do the following by using the Simplest
> Possible Expression Language (SPEL) provided with the
> reference implementation:
>
>   <tag attribute="$foo.bar.baz"/>
>   <tag attribute="$param:paramName"/>

The above examples make things prettier but don't really
add much functionality over JSP expressions. The original
author in this thread was looking for something like:

  <tag attribute="<bean:write bean="..." property="..." />

The problem is that the example isn't very good because it
is only a <bean:write> which is pretty much just a lookup
and can be handled with JSP expressions. But if we take
another example such as:

  <tag attribute="<bean:message key="..." />">

The problem is clearer. The <bean:message> taglib adds some
significant functionality and isn't just a bean access. Stuff
like this has caused me endless frustration.

If SPEL had some way of calling a taglib as if it were a
function, I'd be dancing on my desk. Something like:

  <tag attribute="bean:message(key="yourkeyhere")" />

Seems like the hardest part of adding this is coming up with
a reasonable syntax. But I don't believe it's been done yet.
I do note, however, that that JSPTL provides a way of plugging
in expression languages. So maybe this will encourage future
experimentation in this direction.

Devon

Reply via email to