File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Displaytag checkbox using struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Displaytag checkbox using struts2" Watch "Displaytag checkbox using struts2" New topic
Author

Displaytag checkbox using struts2

Joel Sand
Greenhorn

Joined: Feb 25, 2009
Posts: 8
Hello,

I have installed struts2.0.11 clean with maven2 and added the displaytag 1.2 dependency in pom.xml (and also the filters in web.xml).
Printing tables work perfectly well until I try to use the decorators which are used for posting form values with checkboxes as in this example at displaytag.sourceforge.net.
The error I receive when I'm running the homepage is the following:


The controller is returning a RowSetDynaClass, accounts to the jsp (PrintUsers.jsp) which looks like this:

I'd be happy to provide you with whatever information you need in order to help me out here.

Thanks in advance!
Joel S
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

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]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Readable JSP might help :p

Have you tried with a recent version of S2?
Joel Sand
Greenhorn

Joined: Feb 25, 2009
Posts: 8
Hi David,

thanks for the quick reply!
(the jsp code should be fixed now)
I've also tried with Struts 2.1.6 but this gives me exactly the same error.

/Joel
Joel Sand
Greenhorn

Joined: Feb 25, 2009
Posts: 8
Ok, I solved it!
The displaytag decorator is looking for a DynaBean named "id" in the RowSetDynaBean table. (I'd guess to have something to sort the rows by)
So after I had added an id to the account table it stopped complaining, case closed!

Piz!
 
 
subject: Displaytag checkbox using struts2