[ 
http://issues.apache.org/jira/browse/JELLY-234?page=comments#action_12426066 ] 
            
Kohsuke Kawaguchi commented on JELLY-234:
-----------------------------------------

Sorry, cut and paste error. The bug report text is meant to be as follows:

Consider a doubly nested <invokeBody/> invocations like the following sequence,
where tag A and B are DynamicTag:

<A>
  <X/>
</A>

where A is defined as ...

<B>
  <Y>
    <define:invokeBody/>
  </Y>
</B>

where B is defined as ...

<Z>
  <define:invokeBody/>
</Z>

For this to correctly expands to <Z><Y><X/></Y></Z>,
We need to find the <X/> as the body when we are executing <define:invokeBody/> 
inside <Y> tag.
To do this, body Tags (to be invoked) need to be maintained as a stack, and 
when <invokeBody/>
is invoked inside <Z>, we need to 'pop' the body so that the proper body (<X/>) 
will become
visible.


> Nested DynamicTag and <invokeBody/> doesn't work correctly
> ----------------------------------------------------------
>
>                 Key: JELLY-234
>                 URL: http://issues.apache.org/jira/browse/JELLY-234
>             Project: Commons Jelly
>          Issue Type: Bug
>          Components: core / taglib.core
>    Affects Versions: 1.0
>            Reporter: Kohsuke Kawaguchi
>
> Consider a doubly nested <invokeBody/> invocations like the following 
> sequence,
> where tag A and B are DynamicTag:
> <A>
>   <X/>
> </A>
> where A is defined as ...
> <B>
>   <Y>
>     <define:invokeBody/>
>   </Y>
> </B>
> where B is defined as ...
> <B>
>   <define:invokeBody/>
> </B>
> For this to correctly expands to <Y><X/></Y>,
> We need to find the <X/> as the body when we are executing 
> <define:invokeBody/> inside <Y> tag.
> To do this, body Tags (to be invoked) need to be maintained as a stack.
> The additional reservevd 'org.apache.commons.jelly.body.scope' variable 
> performs this role.
> Whenever a JellyContext has 'org.apache.commons.jelly.body', there's always
> 'org.apache.commons.jelly.body.scope' variable on the same context. The 
> 'scope' points back
> to the JellyContext where the previous 'org.apache.commons.jelly.body' (and
> hence 'o.a.c.j.b.scope' as well) is available, thus forming a stack in terms 
> of linked list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to