commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Keese" <bi...@tech.beacon-it.co.jp>
Subject Re: [Jelly] Modularization: To Return A Non XMLOutput/String Object
Date Tue, 10 Jun 2003 07:34:14 GMT
I tested similar things, namely with <threads:group> and <threads:thread>.
The following works fine:

  <threads:group>
       <threads:thread>...</threads:thread>
  </threads:group>

"thread" adds itself to "group".  However, I wanted to define my own tags
like ant, <parallel> and <single>,
The usage idea was:
   <parallel>
         <single> ... </single>
         <single> ... </single>
   </parallel>

The code that didn't work was:
    <define:tag name="parallel">
        <threads:group var="myGroup">
           <define:invokeBody/>
         </threads:group>
         <threads:wait group="${myGroup}"/>
    </define:tag>

    <define:tag name="single">
           <threads:thread> ... </threads:thread>
    </define:tag>

I traced through the code and it was failing because of the compile-type
ancestor function.

Bill

----- Original Message ----- 
From: "Paul Libbrecht" <paul@activemath.org>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Tuesday, June 10, 2003 3:51 PM
Subject: Re: [Jelly] Modularization: To Return A Non XMLOutput/String Object


> Bill Keese wrote:
> > Hello Paul,
> >
> >
> >>Then maybe using TagSupport.findAncestorWithClass() would help ?
> >
> >
> > I don't think this would work because (I forget the correct terminology
> > but...) findAncestorWithClass() finds compile-time ancestors rather than
> > runtime ancestors.  So in the following example, when bar calls foo, bar
is
> > not considered an ancestor of foo:
> >
> > <define:taglib uri="myLib">
> >
> > <define:tag name="foo">
> >     ... I want to set a return value in bar ...
> > </define:tag>
> >
> > <define:tag name="bar">
> >     <foo arg1="123"/>
> > </define:tag>
> >
> > </define:taglib>
> >
> > Instead, the ancestor of "foo" is define:taglib, or something like that.
> > Too bad!  Do you agree?
> >
> > Bill
>
> That was my fear.
> Have you actually tested it ?
> The problem would be the same, I guess, with an included script...
>
> If this is the case, then we should request an extra method doing this
> job precisely. At least I presume it would be helpful...
>
> Paul
>
>
> ---------------------------------------------------------------------
> 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