• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

nested:iterate problem - no getter method for bean property?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to iterate through an arrayList of beans and display each bean's properties. My bean is an inner class of an ActionForm class, and has getter and setter methods for all its properties.

The array is a property of the ActionForm and has a getter method. I also have an 'addbean' method in my ActionForm to add new beans to the array.

My JSP code is as follows:

<nested:nest property="ListSitesForm">
<nested:iterate id="SiteBean" name="ListSitesForm" property="sites">
<tr>
<td>
<nested:write name="SiteBean" property="siteID"/>
</td>
</tr>
</nested:iterate>
</nested:nest>

I am getting an exception: "javax.servlet.ServletException: No getter method for property siteID of bean SiteBean"

However, the inner SiteBean class DOES have a getter method for the siteID property.

Any help would be greatly appreciated!

Thanks,

Graeme
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps a case-sensitive issue. Method should be getSiteID()
 
Nothing up my sleeve ... and ... presto! A tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic