On Thu, Jun 21, 2001 at 02:31:10PM +0200, Roland Huss wrote:
> What's about writing a wrapper tag which introduces a bean like this:
> 
> <new:evaluator id="evalBean">
>    <my:foo a='bar'>
> </new:evaluator>
> 
> <new:evaluator id="evalBean">
>    <my:bar b="<%= evalBean.toString() %>"/>
> </new:evaluator>
> 
> <my:baz b="<%= evalBean.toString() %>"/>
> 
> and <new:evaluator> creates and introduces a simple bean in page scope
> if needed, and puts its body into the bean ?

I guess that would work, thanks. But that brings me to another idea -
wouldn't it be easier to define a Bean to keep that temporary value?

Like this:


<jsp:useBean id="tempBean" class="some.strange.JavaBean">
  <jsp:setProperty name="tempBean" 
                   property="str" value="<x:foo a='bar' />" />
</jsp:useBean>
<x:baz b='<jsp:getProperty name="tempBean" property="str" />' />


That would be much less efford than introducing a new taglib just for
keeping a value (and IMHO has the same "unreadability-factor" than the
taglib solution ;-)

Or am I something missing?

-Felix

Reply via email to