You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "David M. Karr" <dm...@earthlink.net> on 2002/09/01 05:21:02 UTC
No "indexed" access ala Struts?
I don't think this is available in the EL, but I'll ask just to make sure.
Struts property references allow you to specify array indices, like
"arrayIndexed[3]", when you have a method in your bean like this:
public int getArrayIndexed(int index) {
return (arrayName[index]);
}
This is in addition to the more conventional references like "array[3]", with a
corresponding bean method of this:
public int[] getArray() {
return (this.arrayName);
}
JSTL can deal with the latter, allowing a reference like "array[3]". I don't
believe it will handle the former in any way. Is that correct? I've tried
some experiments and gone through the EL syntax, and I don't see anything like
this.
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: No "indexed" access ala Struts?
Posted by Shawn Bayern <ba...@essentially.net>.
On 31 Aug 2002, David M. Karr wrote:
> JSTL can deal with the latter, allowing a reference like "array[3]".
> I don't believe it will handle the former in any way. Is that
> correct? I've tried some experiments and gone through the EL syntax,
> and I don't see anything like this.
This is correct. We considered the feature, but it wasn't a priority, and
nobody presented a compelling need for it. In JSP 2.0, you could
accommodate it with a function; it could also always be added in a future
version of JSP.
--
Shawn Bayern
"JSTL in Action" http://www.jstlbook.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>