commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S Schrem <ssch...@yahoo.com>
Subject Re: [jelly] defined tags and attributes
Date Thu, 09 Sep 2004 13:18:12 GMT
I've run into this problem, but still can't decide
what the appropriate behavior should be.
It is due in large part to Jelly's naive variable
scoping scheme.
Workaround: if you look at the implementation you'll
see that Jelly always creates a second set of local
variables of the same name but with 'Attr' appended.
Use those variables within the tag definition.

e.g.

<t x="value">
  Do someting
</t>

<define:taglib>
<define:tag name="t">

  <!-- tag attributes on input-->
    <j:if test="${xAttr == null}">
       <log:error>TagLib:t, xAttr==null</log:error>
    </j:if>  
</define:tag>
</define:taglib>

Hope this helps,
  Serge

--- Dion Gillard <dion.gillard@gmail.com> wrote:

> That sounds like a bug to me.
> 
> If you could come up with a failing test case,
> that'd be great.
> 
> 
> On Thu, 9 Sep 2004 10:21:34 +0200, Paul Libbrecht
> <paul@activemath.org> wrote:
> > 
> > Dear Jellyers,
> > 
> > If I have defined a tag named "t" using the
> jelly-define tag-library I
> > can invoke
> > 
> > <t attribute="value">
> >   Do someting
> >   </t>
> > 
> > and the variable attribute will be defined to
> "value" inside the tag...
> > BUT... if attribute was already defined (say, to
> be "old-value") its
> > old value will be there, not "value"...
> > 
> > I view this as a bug... but maybe others can
> comment on that?
> > 
> > thanks
> > 
> > paul
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> 
> -- 
> http://www.multitask.com.au/people/dion/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message