aspose file tools*
The moose likes Struts and the fly likes Using Displaytag, Checkboxes and Struts to get values - I'm a bit lost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using Displaytag, Checkboxes and Struts to get values - I Watch "Using Displaytag, Checkboxes and Struts to get values - I New topic
Author

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

Dino Be
Greenhorn

Joined: Apr 30, 2009
Posts: 3
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

Joined: Jan 10, 2002
Posts: 61760
    
  67

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Displaytag, Checkboxes and Struts to get values - I'm a bit lost