• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

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()
 
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!