aspose file tools*
The moose likes JDBC and the fly likes check boxes retrieving problem  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "check boxes retrieving problem  " Watch "check boxes retrieving problem  " New topic
Author

check boxes retrieving problem

mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

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

Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

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.


S.D. MADHAN
Not many get the right opportunity !
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: check boxes retrieving problem