The tags support maps, too.

http://struts.apache.org/2.x/docs/type-conversion.html

Dave

--- Kevin Wade <[EMAIL PROTECTED]> wrote:

> Thanks for the tip, Dave.  However, it's not working
> for me.
> 
> I think the problem may be that the "author" objects
> that I'm  
> iterating over is a Set, not a List.  (These objects
> are pojos  
> hydrated by hibernate).  I might be wrong, but I
> didn't think Sets  
> are indexable like Lists.  No?
> 
> I suppose I could always pull the Set of author
> objects out of  
> report, make it a List or something directly on the
> value stack,  
> update that List via the iterator-driven code you've
> given me, and  
> then stuff it all back in as a Set in the final
> action.  Is that the  
> only way to get changes back in to an object in a
> Set?
> 
> Kevin
> 
> On Nov 16, 2007, at Friday, November 16, 2007  -
> 11:21 PM, Dave  
> Newton wrote:
> >
> > One way to create that association is by using
> array
> > notation via <s:iterator...>'s "status" attribute
> [1]
> > which will let you get the list index position;
> you
> > use that to create the name of the
> <s:textarea...>,
> > more or less like this (it's late so my syntax is
> > probably... suspect):
> >
> > <s:iterator value="report.authors" status="stat"
> > id="foo">
> >   <s:textarea
> name="report.authors[%{stat.index}].bio"
> > value="%{#foo}"/>
> > </s:iterator>
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to