struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: Lists within lists issue
Date Thu, 10 Nov 2005 01:47:19 GMT
On 11/9/05, Rick Reumann <> wrote:
> Michael Jouravlev wrote the following on 11/8/2005 7:15 PM:
> >> <html:textarea
> >> property="someObject[${aProp.someIndex}].subobject[${bProp.someIndex}].someField"/>
> > Any idea how to simplify input using JSTL 1.1 (JSP 2.0) only?
> Well, that would be pretty much impossible without writing a tag to do
> it (since as it stands how could JSP or JSTL have any idea what your
> nested property names are?). If you did make a tag to do it you would
> end up with is something similar to the nested tag:) I think a generic
> "nestedGeneric" tag would be nice which acts like the nested tag but is
> used to just output the correctly structured name property for nested
> elements.

Indeed, nested tags work cleaner because they already understand the
contracts between the names on the HTML controls and the form bean
population mechanism used by Struts. This give and take is a very
frameworky thing, and also the reason why the Struts documentation
recommends JSTL replacements for specific tags within specific Struts
taglibs (one can go beyond that, with a pain threshold to match).

Rick -

If you are taking suggestions about your code snippets, which offer a
nice comparison for nested lists, maybe they'd be better off without
the Struts HTML tags? ... since:

 * The HTML tags in that usecase are simple enough to write out as
HTML markup, so this:
<html:text property="foo" value="bar" />
can become this:
<input type="text" name="foo" value="bar"/>

 * Doing so will remove all Struts taglibs from that snippet, not just
the nested one (with the assumption that if someone's trying to avoid
one, they're probably trying to avoid all).


> --
> Rick

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message