• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Displaytag, Checkboxes and Struts to get values - I'm a bit lost

 
Dino Be
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm completely lost in trying to use Struts, JSTL, DisplayTag to show a resulttable on a jsp. The idea is to have a table, which can be sorted clicking on the table headers using displaytag. The user can select multiple 'records' in the table and submit them to be processed.

I had links in my table, but unfortunately this means that the user can only click on 1 item at a time. The user should be able to select multiple values, the a hrefs need to go.

Showing the table using display tag works. The problem arises when I'm trying to add the checkboxes. I'm completely lost in the documentation on the displaytag site.

So far I have the jsp with the resulttable using displaytag. I have put the table on a form, given it a name and used the same form in the table.



I have tried to add a Decorator to show the checkboxes, unfortunately I'm lost there how to build the decorator. So far I have:



My questions are:

- What should the decorater class look like, what getters/setters/code needs to go there
- Do I need a class "supplierpersonresulttableform" which coudl have getters/setters for the checkboxes
- How to submit the selected values (checkboxes) using struts? (Do I need to get the values from the supplierpersonresulltableform, or directly as parameters from the request)?



If someone could point me in the right direction I'd be most thankful
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64615
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic