Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Do not set lab on fire. Or this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic