In my page am having two dropdown on combination of two am getting results of 10 values.
Now I need to display the 10 values with 12 textboxes for each, i.e I will get 120 textboxes totally. Where user will fill the values and submit the page.
How to take these values to action page so that I can update the values in database?
And also like if already there is values for the 12 boxes for each element I need to display them by default.
Please give me a logic for this as am new to this.
I mean to say like as am having two dropdown's ID and PLACE on change of both am accessing database and getting some results of 5 or 10 or 20 values or etc......
Suppose i choose ID as 1 and PLACE as India I will get results of 3 people names like A,B and C
so next to A i need to show 12 textboxes, again next to B i need to show 12 textboxes and next to C i need to show 12 textboxes.
And the user will fill some values in these 36 textboxes and submit the page.Now i need to read and save in DB. Am using STRUTS framework.
Here i am expecting that You have created text boxes as much as You need on page with the help of java script (if not then tell us, i will tell you ).
now put name Your test boxes say You have 3 text boxes
put another hidden text box (say "allTextName") in which You will store comma separated string of name of all text boxes for example "allTextName" value will be "textBox1,textBox2,textBox3"
and while adding or deleting text boxes, update "allTextName".
Now in Your action class, simply get
request.getParameter("allTextName") and tokanize it through ",". at this point You have all the names of textboxes just put in request.getParameter() and fetch the values