• 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

Indexed Properties

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I am using struts 1.2.9 and i get the error no getter method for property submissions. (JDK 1.3)

if i remove the methods which take index as parameters, it works fine.

Where exactly is the problem?
Thanks in advance
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the past, I've had problems with Struts not dealing with overloaded methods properly in ActionForm beans. I'm not sure if the bug has been fixed or not, but I always make it a practice to name the indexed getter and setter something different than the non-indexed ones.

In your example, I'd have a getSubmissions and setSubmissions method to deal with the entire collection, and a getSubmission and setSubmission method to deal with a single indexed entity.
 
Thara Visu
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Merrill.
 
reply
    Bookmark Topic Watch Topic
  • New Topic