Hi,
I'm having difficulty understanding what JellyContext.setInherit()
accomplishes. In a custom tag library I have TagSupport-derivatives : e.g.,
given
<doc>
<my:a> <!-- maps to TagA -->
<my:b/> <!-- maps to TagB -->
</my:a>
<my:c/> <!-- maps to TagC -->
</doc>
In TagA.doTag() :
...
getContext().setVariable ("monday", "blue");
...
In TagB.doTag() :
System.out.println (getContext().getVariable ("monday"));
This currently prints "blue" - in other words, a context var set in one tag
is visible in the context of a child tag. Great!
FWIW, this was _not_ working until I started using CVS HEAD instead of a
snapshot.
Now my confusion starts. Although getContext().getInherit() returns true,
adding getContext().setInherit (false) to either (or both) doTag() methods
seems to have no effect on this behaviour. This is what I had expected from
findVariable() -- but not from getVariable(). What am I misunderstanding?
Will this same context be visible in TagC?
This is all driven using a modified EmbeddedJelly.java, running CVS HEAD on
a Linux / JDK 1.3.1 platform.
Suffice to say that Jelly is stonkingly good, I expect it imminently to
achieve world domination. Many thanks for the diligent labours involved.
Yours aye,
Thomas.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- Re: [jelly] How does context inheritance work? Thomas Nichols
- Re: [jelly] How does context inheritance work? James Strachan
- Re: [jelly] How does context inheritance work? Paul Libbrecht
- Re: [jelly] How does context inheritance work? Thomas Nichols
- Re: [jelly] How does context inheritance work? James Strachan
