struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Iterator Problem: how to get the changed values ?
Date Wed, 04 Apr 2007 16:42:13 GMT
--- Syed Ibrahim <> wrote:
> I am using iterator to list some values in textfilds
> in tabular format, following way.
> <s:iterator value="myList">
> 	<s:properties value="Id"/>	
> 	<s:textfield value="%{name}"
> </s:iterator>
> How can I achieve that in Struts 2 ?

You should be able to just make myList be something
List-y (and if you use generics I don't think you need
to do anything w/ the conversion properties file) and
use the status.index to create array-ish property

<s:iterator value="beanList" status="stat">
  <s:textfield name="beanList[%{stat.index}].propName"

(Or something like that; I don't have any of my code
in front of me, but hopefully that's enough to get you
started :/



Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.

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

View raw message