• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaytag checkbox using struts2

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic