• Post Reply Bookmark Topic Watch Topic
  • New Topic

nested bean tag in logic iterate  RSS feed

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the following tags in my JSP.
<form name="myForm">
.....
....
<logic:iterate id='choiceValues' name='CHOICE_VALUES' >
<bean efine id='value' name='choiceValues' property='value'/>
<a href="editChoice.do?actionType=editChoiceValue&ChoiceValue=<%=value.toString()%>">
<img src="<bean:message bundle='mybumdle' key='image.edit'/>" width="12" height="12" border='0'>
</a>
.
..
...
</logic:iterate>
...
.......
</form>
And getting this exception...
javax.servlet.jsp.JspException: No getter method for property value of
bean choiceValues
'CHOICE_VALUES' is a List of values in the request that I want to iterate over and assign the value for each edit gif image in every row that is produced depending on the number of values in the list.

My form bean named myForm has the getter and seter for the attribute value.

Any reason why I am gettign this exception...
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to your code, whatever Objects make up the list stored in "CHOICE_VALUES" should have a getValue() method, since that is what you are asking for by specifying the property attribute of your <bean:define> tag. According to the error you are getting though, it looks like the objects in your list don't have a getValue() method. If the objects in your list are just Strings, you need to get rid of the property attribute in your <bean:define> tag. See the Struts-Bean tag API reference for more information on this tag.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!