Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Vikas Ramnani

Greenhorn
+ Follow
since Sep 20, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vikas Ramnani

Oh yes my bad !
I got it working.
Thank you very much for your help.

Vikas
9 years ago
I am getting NullPointerException on method setVersionArray.
9 years ago
Hi,
Thanks for replying.
I already read that link following that I made a skeleton which I am posting here

MY Java Script

My relevant Form part


In my Action I am using

form.getVersionArray(1);

Where form is instance of my Form Bean. But I am getting exception when I submit this form, I am new to struts I might have missed some details in that article, But I am kind of stuck. Please guide me where I am doing the mistake.

Best,
Vikas

JCE: Please UseCodeTags
9 years ago
Hello,
I saw similar queries have been asked in other topics, But even after reading that I could not lend up with a proper solution. So I am posting it in new thread.
Here is what I want to do, I want to have a Add button in my JSP which on click generate a textbox. This completely depends on user how many times he clicks on the Add button.
I have successfully implemented the java script part, But I am not sure How can I retrieve the information in those textboxes in my Struts action.

I have tried giving dynamically generated textboxes same name. I defined an ArrayList with the same name and getter, setter methods with that name in my Form Bean. But it didn't work.
Could anybody please tell me :
1. What kind of name should I give to the dynamically added textboxes ?
2. What kind of field should I define in my Form Bean to retrieve the information ?
3. What should be my getter setter methods for that particular field ?

Thank you very much in advance.

Best,
Vikas
9 years ago