--- Syed Ibrahim <[EMAIL PROTECTED]> 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
names.

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

(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 :/

See:

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

d.



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

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

Reply via email to