struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: [struts2] s:generator not generating output
Date Mon, 29 Oct 2007 14:49:07 GMT
--- Marcos Mendonça <marcosm@gmail.com> wrote:
> Say I want to generate input fields and name them
> according to the iterator value. How would I do
that?
> 
> <s:generator val="%{getTamanhoGrupo()}" separator=""
> count="%{getTamanhoGrupo()}">
>         <s:iterator value="%{top}">
> 		    <s:textfield name="dynaField.area" size="2"
> value="11">
> 		    </s:textfield>
>         </s:iterator>
> </s:generator>

You'd probably just want to use the "status" attribute
of the <s:iterator...> tag and use it to build the
name of the text field, although you might want to
consider using array/map notation to clean things up
on the action side.

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message