• Post Reply Bookmark Topic Watch Topic
  • New Topic

Checkboxes and Servlets

 
Zubin Wadia
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a field - called mat
I need to read these values from mat and display them as checkboxes
once I do that - I have to subsequently query on the checkboxes that are checked by the user. is this possible? and if so, HOW?
Desperate.
Zubin.
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assumen you use html (jsp) pages. In your page you have a checkbox. Ycheck box have name = "ssss", and value = "uuu". If the checkbox is cheked the value(uuu)will be collected by servlet. If it is not checked the value will be null. They will work like this.
Hope this help.
 
Zubin Wadia
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ruilin,
Thank you for your reply - but the problem is when u return say 50 checkboxes - because there are 50 checkboxes in the DB - it doesnt create an individual checkbox object for each return - its kinda complicated. if it was a standard Checkbox it would be simple. And I am using Servlets - no JSP.
THanks though
Zubin.
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if u each checkbox has its own name you will get all different objects.
If you checkbox only hava one name then it will be different.
 
Zubin Wadia
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ruilin,
yes - there are not individual objects... they are like this
14 Material classes - each class has materials - about 125 of them
therefore- u have a servlet that creates checkboxes based on 14 resultsets....
so u have 14 checkbox objects based on matclass - for example - 'animal' is one.
this returns a couple of checkboxes with the same matclass
so u have - Elephant, Dog etc. but they r all called to the object 'animal'
so any idea how else to do this?
Thanks Ruilin.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!