You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kris Schneider <kr...@dotech.com> on 2003/05/07 16:49:26 UTC
RE: [Unverified Sender] RE: logic:iterate help needed: "id" not a vailable/broken/buggy?
I believe that's determined by whether a tag has a TagExtraInfo class declared
in its TLD. The TagExtraInfo.getVariableInfo method provides the details on
which scripting variable get created.
Quoting "Nelson, Laird" <La...@FMR.COM>:
> > -----Original Message-----
> > From: Nelson, Laird [mailto:Laird.Nelson@fmr.com]
> >
> > > -----Original Message-----
> > > From: Kris Schneider [mailto:kris@dotech.com]
> > >
> > > Since you're using 1.0.2:
> > >
> > > <bean:message key='<%=
> > > String.valueOf(pageContext.getAttribute("p")) %>'
> > > bundle="bundleKey"/>
> >
> > Thank you! That did the trick. Is this a bug? A feature?
>
> Also, sometimes it appears that page context variables are available to
> scriptlets as is, and sometimes they appear not to be. What are the
> governing rules behind this? I'll dig into the JSP specification in the
> meantime.
>
> As an illustration, this works:
> <bean:define id="blat" name="someExistingBean" type="fiz.boo.baz"/>
> <%
> final int squishiness = blat.getSquishiness();
> %>
> ...but, as I've been illustrating in my other messages, the page context
> bean defined by the "id" attribute of <logic:iterate> is not available for
> use "as is" by a runtime expression within <bean:message>'s "key"
> attribute.
>
> >From looking at the code, DefineTag.java does a simple
> pageContext.setAttribute(). The IterateTag.java also does a simple
> pageContext.setAttribute(). How come I can refer to one "as is" in a
> scriptlet, and can't refer to it in a runtime expression?
>
> Laird
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org