• Post Reply Bookmark Topic Watch Topic
  • New Topic

How Do I Append a Column to a Table for Check Box  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1760
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP that displays in a table data retrieved from resultset data that has been fed into an array of arrays. I would like to add a column to the begining of the table that would display a check box for each row. If the check box has value of one it is used in the next portion of the app code.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the issue? What have you thought of so far?
 
Steve Dyke
Ranch Hand
Posts: 1760
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right now to display the data into the table I use c:foreach loops one embeded into the other. The first for row then column. I am using <%> tags to act as counter which I use to give each row and cell a unique id name. This works great. I want to do an input - checkbox if the cell counter is 0 but I cannot figure out how to set the test string in my c:when condition yet.
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the code using code tags

Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using <%> tags


If by this you mean that you are using scriptlets, then why? Use JSTL or use scriptlets. Using both just makes a mess of things.
 
Steve Dyke
Ranch Hand
Posts: 1760
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every time I try posting my code that contains scriptlet tags I get an error.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!