Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SimpleFormController ReferenceData not working

 
Anoop Nair
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • 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





 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic