You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Otávio Augusto <ot...@bol.com.br> on 2004/01/03 03:22:50 UTC
dynamic input fields
I need to generate html:text fields on demand. If i have N elements in a certain collection, i need one html:text field for every one of the elements in that collection. how to perform that? I'm using the code:
<bean:define id="meusLotes" name="venda" property="meusLotes" />
<logic:iterate id="lotes" name="meusLotes" >
Value:<br>
<html:text indexed="true" styleClass="inputtext" property="valor" size="5" maxlength="5"/><font color="red">*</font><br>
</logic:iterate>
What is missing?
Thanks in advance
Otávio Augusto
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: dynamic input fields
Posted by Mark Lowe <ma...@talk21.com>.
What does your action form look like?
The jsp should look something like this
<logic:iterate id="lotes" name="meusLotes">
<html:text name="lotes" property="valor" indexed="true" />
</logic:iterate>
Cheers Mark
On 3 Jan 2004, at 03:22, Otávio Augusto wrote:
> I need to generate html:text fields on demand. If i have N elements in
> a certain collection, i need one html:text field for every one of the
> elements in that collection. how to perform that? I'm using the code:
>
> <bean:define id="meusLotes" name="venda" property="meusLotes" />
> <logic:iterate id="lotes" name="meusLotes" >
> Value:<br>
> <html:text indexed="true" styleClass="inputtext" property="valor"
> size="5" maxlength="5"/><font color="red">*</font><br>
> </logic:iterate>
>
>
> What is missing?
> Thanks in advance
>
> Otávio Augusto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org