Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best Approach to Designing a Page of Check Boxes  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1776
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am useing the div tag approach on my web page. I have a div tag being populated with a JSP that depending on user input will be populated with a list of check boxes.

The checkboxed represent a list of values from a remote data source.

The number of check boxes will be dynamic and there value(checked or not) will be determined from data source values.

I currently have this working using javascript to build a table.

Would it be better to use JSTL in the JSP to do this?
 
Paul Clapham
Sheriff
Posts: 22531
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say so. If nothing else it removes the minor problem that your page doesn't work if the client has Javascript turned off. But even if it were mandated that we didn't care about that, I would still do it in JSTL. I reserve Javascript for processing that has to take place on the client.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course. Why build JavaScript to build the DOM when you can just build the DOM?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!