Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

check boxes retrieving problem

 
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
    Bookmark Topic Watch Topic
  • New Topic