Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0
-
None
-
None
Description
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.
Attachments
Attachments
Issue Links
- duplicates
-
JELLY-95 invokeBody does not seem to work with nested tags
- Open