Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:options throws error due to labelProperty attribute

 
Timotius Pamungkas
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all...

I encountered following error (HTTP status 500) during development :

....
javax.servlet.jsp.JspException: Cannot find bean under name org.apache.struts.taglib.html.BEAN
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:407)
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:294)
....


And this is due to following snippet in jsp


<html:select name="peopleEntryPsychotestResultForm"
property="psychotestInstitute">
<html ptions name="peopleEntryPsychotestResultForm"
property="psychotestInstituteValues"
labelProperty="psychotestInstituteLabels" />
</html:select>


The problem is in labelProperty. If I removed that attribute, it works (at least, it display desired page). The problem is combo box labels are not defined correctly.
I've checked psychotestInstituteLabels, and it contains correct values. Even if I write tag "property = "psychotestInstituteLabels"", it displays correct value. But when I'm using labelProperty, it becaomes messy.
What happened? In other pages that uses html:select, all labelProperty tag works just fine, only in this page it becomes bad.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try adding labelName="peopleEntryPsychotestResultForm" to your tag. This link explains why you should do that.
 
Timotius Pamungkas
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic