• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Checkboxes and Servlets

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic