Oh, if the taglibs are not from you then I believe the best you can do is to
write a tagExpose tag that will do like this:
<x:tagExpose id="myBean">
<my:foo a='bar' />
</x:tagExpose>
Which will be a BodyTag that will expose the BodyContent content to the bean.
And then let the bean for the rest of the page.
Wellington
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 2:06 PM
To: [EMAIL PROTECTED]
Subject: Re: how to quote nested tags
On Thu, Jun 21, 2001 at 12:57:03PM +0200, Lacerda, Wellington (AFIS) wrote:
> On your doStartTag you create the object you want to store, then use the
> implicitly defined pageContext object to store it:
>
> MyBean someBean = ....
> ....
>
> pageContext.setAttribute("theNameYouExposed", someBean, REQUEST_SCOPE) //or
> SESSION_SCOPE or CONTEXT_SCOPE or PAGE_SCOPE
>
> or
>
> pageContext.setAttribute("theNameYouExposed", someBean) to store it in the
> page scope
>
>
>
> then in the recipient tag you retrieve it with:
>
>
> pageContext.getAttribute("theNameYouExposed",REQUEST_SCOPE) // or....
>
> or simply pageContext.getAttribute("theNameYouExposed") if it is in page
> scope.
Ah, ok, this way. The problem is that the taglibs are 3rd party and
therefore should/could not be modified... isn't there a way where I
don't have to modify the taglib sources?
I guess something like this could be an option, but besides having
these ugly scriptlets in my JSP's, I see no way to store the tag
expansion in a variable within a scriptlet...
...
<%
{
String tmpStr;
tmpStr = %><my:foo a='bar' /><% // this obviously will not work...
%>
<my:bla b='<%= tmpStr %>' />
<%
}
%>
-Felix