• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

SimpleFormController ReferenceData not working

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using Spring 2.5 MVC.

I have a controller which extends SimpleFormController. In there I have overridden the referenceData method as I need some data in the form.

In the JSP, I want to display the content set in the reference data in a drop-down. But I am getting below exception:

16:37:07,001 INFO [STDOUT] 16:37:07,001 ERROR [SelectTag] Invalid property 'id' of bean class [java.lang.String]: Bean property 'id' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
org.springframework.beans.NotReadablePropertyException: Invalid property 'id' of bean class [java.lang.String]: Bean property 'id' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:540)
at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:532)
at org.springframework.web.servlet.tags.form.OptionWriter.renderFromMap(OptionWriter.java:164)
at org.springframework.web.servlet.tags.form.OptionWriter.writeOptions(OptionWriter.java:135)
at org.springframework.web.servlet.tags.form.SelectTag.writeTagContent(SelectTag.java:216)
at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:90)
at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77)
at org.apache.jsp.jsp.reports.reporting_jsp._jspx_meth_form_005fselect_005f0(reporting_jsp.java:1109)
at org.apache.jsp.jsp.reports.reporting_jsp._jspx_meth_form_005fform_005f0(reporting_jsp.java:983)
at org.apache.jsp.jsp.reports.reporting_jsp._jspService(reporting_jsp.java:868)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)




Below is the code:

Controller

Model

ReportType

JSP





 
Anderson gave himself the promotion. So I gave myself this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic