From: "James CE Johnson" <[EMAIL PROTECTED]>
> bob mcwhirter wrote:
>
> >I -think- there are some scoping rules about variables usable within
> >a <define:tag>'s body.
> >
> >Or, we have also had some problems with ${booleanVar} not evaluating
> >correctly.
> >
> I think that's the more likely culprit since I'm trying to pass the
> value of the "global" variable to the tag.
>
> What *does* work is:
> <define:taglib...>
> <define:tag ...>
> <j:set var="unitTestSourcesPresent"
> value='${context.getVariable("unitTestSourcesPresent")}'/>
>
> (I think that relates to your comment about scoping)
>
> But I really want to pass the value to the tag rather than expecting
> that the global value is appropriate for all invocations of the tag.
This *should* work. You should be able to pass in arguments to a tag; what
actually happens is the tag gets its own variable scope with any parameters
passed in along with the parent variable scopes. Have you tried just echoing
the ${unitTestSourcesPresent} value? Is it null if you don't add the <j:set>
tag? Maybe this is just a Jexl issue of coding your <j:if> to work properly?
FWIW next week I'm going to try simplify the variable scopes in Jelly
somewhat which might help remove any gremlins left in the
Jelly-Maven-variable scope code.
James
-------
http://radio.weblogs.com/0112098/
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>