Announcement Announcement Module
No announcement yet.
validation error forward Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • validation error forward

    Hi there,

    I have a SimpleFormController and a validator attached to it. When the validation fails, the controller does a forward to the form view. So far, so good.

    It just happens now, that when a forward occurs, all input fields on my form page to which I'm binding through the <form:input> tag are getting binded to an array from the request.

    I wouldn't care how actually binding is working but after a forward to the same page occurs and I'm doing a submit again, the fields of my form are being bound to an array of size 2. when I get back to the page by an forward and submit again, the array size is then 3, and so on. It doesn't matter, if the input fields are filled or not, even empty fields get binded to an array, which gets bigger, every time a forward happens. And this leads to the point where my select combobox gets displayed as a list, and in my empty fields a '{{{, }, {, }}, {{, }, {, }}}' is being shown.

    I have no idea why it is happening. I tried to debug it, but I'm missing input where the origin of this might be.

    Does anybody have a similar issue and can give me a hint what's going wrong here?

  • #2
    Do you have a request parameter in both the the request URL and the form?

    Can you post the *rendered* html, the jsp and the URL that you visit to render that URL please.


    • #3
      Hi Colin,

      thanks for the reply. I attached the body of the rendered html and the jsp. The url I use to visit the page is http://wmuzl403:8080/Auspuffanlagen/auspuffanlage.htm

      And this url is being handled by my simpleformcontroller, as defined in my beans xml (excerpt)

      	<bean id="propertyConfigurer"
      		<property name="locations">
      	<!-- Url Mapping -->
      	<bean id="urlMapping"
      		<property name="interceptors">
      				<ref bean="authorizationInterceptor"/>
      				<ref bean="exportInterceptor"/>
      		<property name="mappings">
      				<prop key="${view.mapping.url.logout}">logoutController</prop>
      				<prop key="${view.mapping.url.auspuffanlagedefinition}">auspuffanlageController</prop>
      				<prop key="${view.mapping.url.beschaffung}">beschaffungController</prop>
      				<prop key="${view.mapping.url.beschaffungplanung}">
      				<prop key="${view.mapping.url.deleteauspuffanlage}">
      				<prop key="${view.mapping.url.deletebeschaffungplanung}">
      				<prop key="${view.mapping.url.einsatz}">einsatzController</prop>
      				<prop key="${view.mapping.url.editeinsatz}">editEinsatzController</prop>
      				<prop key="${view.mapping.url.editbeschaffungplanung}">
      				<prop key="${view.mapping.url.exemplar}">exemplarController</prop>
      				<prop key="${view.mapping.url.risspruefung}">risspruefungController</prop>
      				<prop key="${view.mapping.url.schaden}">schadenController</prop>
      				<prop key="/**/*">dwrController</prop>
      		<property name="lazyInitHandlers" value="true"/>
      	<bean id="viewResolver"
      		<property name="viewClass">
      		<property name="prefix">
      		<property name="suffix">
      	<!-- Interceptors -->
      	<bean id="authorizationInterceptor" 
      		class="" >
      		<property name="messageHelper" ref="messageSource" />
      	<bean id="exportInterceptor" 
      		class="" />
      The key is /auspuffanlage.htm, described in a properties file.

      I'm not sure if this helps you.

      Thanks again for your kind support.



      • #4
        ok, found the problem, it lies in the extremecomponents library i'm using... there is a setAutoInludeParameters(boolean) option, and it was set to true.

        Thanks to your hint colin to have a look at the html, because there I saw that the table component had included the fields of my form again.

        Thanks for your great help and thanks for that great framework spring :-)