• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

check boxes retrieving problem

 
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually i am not sure weather i have to ask this question in jsp or JDBC forum please help me... with this problem

I am using jstl in jsp and to display the data which is already in database and my problem is there are some check boxes are ther in jsp those have to display the data when page is loaded. The related column in DB is STD_COURSE which has courses like java,.net,c,cpp...multiple in a single column,I don't have any idea how to get and chck which one is checked.....


my code is

editstudent.jsp

my query is

my problem is how to get data when different courses are there ?
The code i have written is not working if the first condition is true then it is not displaying boxes in next tr

 
Ranch Hand
Posts: 312
MS IE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the table containing STD_COURSE a master/reference/read-only table?

Ideally, you should have the following tables, STUDENT_MASTER, COURSE_MASTER and STUDENT_COURSE_MAPPING.

STUDENT_MASTER = Student Details + Student ID
COURSE_MASTER = Course Details + Course ID
STUDENT_COURSE_MAPPING = Student ID + Course ID

Now, the STUDENT_COURSE_MAPPING table will contain Student ID, Course ID rows, for each student mapped to multiple courses.

Query this table to find the courses mapped and then in your front-end select/un-select the checkboxes appropriately.
 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply Madhan Sundararajan Devaki
I solved it
my code is

Now my problem is i have to check the each time(repeat the c:forEach loop) i don't want that is there any simple way for comparring the string
 
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic