You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mallik <ma...@yahoo.com> on 2006/10/12 14:11:54 UTC

Adding dynamic elements to form?

Hi friends
i have a situation where i should go for dynamic form elements.
that is i have aproblem like this:
i will give statically one row to enter the details, if he needs more rows
he will click on button then we should provide one more row.how can we do it
in struts,help me please....

form looks like:
-------------------------------------------------------
id          name                  phoneno
------------------------------------------------------
txt_id   txt_name             txt_ph     "button"

after giveing details,if user click on button, the form should
-------------------------------------------------------
id          name                  phoneno
------------------------------------------------------
001         xyz                   123   
txt_id   txt_name             txt_ph     "button"

like this we should add dynamically
waiting for advice with some code

ur's
Mallik
-- 
View this message in context: http://www.nabble.com/Adding-dynamic-elements-to-form--tf2429914.html#a6775012
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Adding dynamic elements to form?

Posted by Mallik <ma...@yahoo.com>.
HI friend i am very new to struts, can you please send some example or
artical on it
ur's
Mallik

Sandeep Gupta wrote:
> 
> create a main form VO which will hold an array of child form VO.
> the child form VO will map to the row elements
> pass this main form VO to struts and in the action class
> iterate over this array to get all row elements
> 
> hope this helps.
> 
> - Sandeep
> 
> On 10/12/06, Mallik <ma...@yahoo.com> wrote:
>>
>>
>> Hi friends
>> i have a situation where i should go for dynamic form elements.
>> that is i have aproblem like this:
>> i will give statically one row to enter the details, if he needs more
>> rows
>> he will click on button then we should provide one more row.how can we do
>> it
>> in struts,help me please....
>>
>> form looks like:
>> -------------------------------------------------------
>> id          name                  phoneno
>> ------------------------------------------------------
>> txt_id   txt_name             txt_ph     "button"
>>
>> after giveing details,if user click on button, the form should
>> -------------------------------------------------------
>> id          name                  phoneno
>> ------------------------------------------------------
>> 001         xyz                   123
>> txt_id   txt_name             txt_ph     "button"
>>
>> like this we should add dynamically
>> waiting for advice with some code
>>
>> ur's
>> Mallik
>> --
>> View this message in context:
>> http://www.nabble.com/Adding-dynamic-elements-to-form--tf2429914.html#a6775012
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> -- 
> Regards,
> 
> Sandeep Gupta
> 
> 

-- 
View this message in context: http://www.nabble.com/Adding-dynamic-elements-to-form--tf2429914.html#a6793662
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Adding dynamic elements to form?

Posted by Sandeep Gupta <sa...@gmail.com>.
create a main form VO which will hold an array of child form VO.
the child form VO will map to the row elements
pass this main form VO to struts and in the action class
iterate over this array to get all row elements

hope this helps.

- Sandeep

On 10/12/06, Mallik <ma...@yahoo.com> wrote:
>
>
> Hi friends
> i have a situation where i should go for dynamic form elements.
> that is i have aproblem like this:
> i will give statically one row to enter the details, if he needs more rows
> he will click on button then we should provide one more row.how can we do
> it
> in struts,help me please....
>
> form looks like:
> -------------------------------------------------------
> id          name                  phoneno
> ------------------------------------------------------
> txt_id   txt_name             txt_ph     "button"
>
> after giveing details,if user click on button, the form should
> -------------------------------------------------------
> id          name                  phoneno
> ------------------------------------------------------
> 001         xyz                   123
> txt_id   txt_name             txt_ph     "button"
>
> like this we should add dynamically
> waiting for advice with some code
>
> ur's
> Mallik
> --
> View this message in context:
> http://www.nabble.com/Adding-dynamic-elements-to-form--tf2429914.html#a6775012
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Regards,

Sandeep Gupta