• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67682
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Did you just should on me? You should read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic