You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Paul Libbrecht <pa...@activemath.org> on 2004/09/09 10:21:34 UTC
[jelly] defined tags and attributes
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
Re: [jelly] defined tags and attributes
Posted by Paul Libbrecht <pa...@activemath.org>.
I am still puzzled... I've committed the test in but it succeeds!
I'll have to check my source of issues...
thanks
paul
Le 9 sept. 04, à 11:49, Dion Gillard a écrit :
> 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
> <pa...@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?
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [jelly] defined tags and attributes
Posted by S Schrem <ss...@yahoo.com>.
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 <di...@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
> <pa...@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
Re: [jelly] defined tags and attributes
Posted by Dion Gillard <di...@gmail.com>.
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 <pa...@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