Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaytag checkbox using struts2

 
Joel Sand
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64843
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Readable JSP might help :p

Have you tried with a recent version of S2?
 
Joel Sand
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic