Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multi row , multi column checkbox form processing in JSP  RSS feed

 
Irus Albert
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have to write part of a code that deals with displaying data from a database to the user. After the user selects one or more of the rows (using checkbox here). i need to catch the values. Here is what i wrote for the form.




I have two doubts here

1) I know I can use to get a list of all the checkboxes that have been marked. But, if i do checked[i].value , I need to to get the values for a, b and c. How do I do that. I may have to concatenate a,b and c and put it in the value parameter of the checkbox. But, then processing it later becomes messy. So is there any other way around this problem.

2) In the value paramater of the checkbox , how exactly do I use the a,b,c variables because i have not used jstl before and i am new to javascript too. can i simply do value="${var.a}+${var.b}+${var.c}" or is that wrong.
 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to provide unique values to the check boxes in order to differentiate them. This is the only way i guess.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really need to get the values at your jsp? Why are you doing this at your jsp?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!