aspose file tools*
The moose likes Struts and the fly likes html:options throws error due to labelProperty attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:options throws error due to labelProperty attribute" Watch "html:options throws error due to labelProperty attribute" New topic
Author

html:options throws error due to labelProperty attribute

Timotius Pamungkas
Greenhorn

Joined: Feb 26, 2005
Posts: 28
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

Joined: Feb 15, 2005
Posts: 4864
Try adding labelName="peopleEntryPsychotestResultForm" to your tag. This link explains why you should do that.


Merrill
Consultant, Sima Solutions
Timotius Pamungkas
Greenhorn

Joined: Feb 26, 2005
Posts: 28
Problem solved. Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:options throws error due to labelProperty attribute