Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generate HTML table using jsp tag

 
Sandeep Kumar B
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I need that the html table needs to be consistent across my project
i.e., I need summary, caption, headers, id etc as per web accessibility
http://www.w3.org/TR/WCAG10-HTML-TECHS/#data-tables

To enforce that tables are created only through this way, I will pass the data for the table along with other attributes(width of each column etc and other info) to the tag

Questions
1. Is there a data structure to support the table kind of data? (using MultiKeyMap is one way)
2. Is there a better way if above method is not good to enforce all html tables created follow web accessibility standards
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35266
383
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems awkward to use a tag to me. I think a better way is to code the tables in your JSPs and tell people to use caption, etc. Then use "static analysis" to check the standards are met. I wrote a unit test that I used for Section 508 compliance. The idea was to have JUnit go through each JSP and make sure tables (and more) meet the required patterns.

You have this problem regardless because you'd need a way to ensure all developers used your table tag.
 
Kartik Mavani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can look into apache widget.
For table you can look into Apache Widget DataTable class" .
It will create HTML for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic