Announcement Announcement Module
Collapse
No announcement yet.
validation error forward Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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.

    Comment


    • #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)

      Code:
      	<bean id="propertyConfigurer"
      		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      		<property name="locations">
      			<list>
                      <value>classpath:beans.properties</value> 
                      <value>classpath:project.properties</value> 
                  </list>			
      		</property>
      	</bean>
      	
      	<!-- Url Mapping -->
      	<bean id="urlMapping"
      		class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
      		<property name="interceptors">
      			<list>
      				<ref bean="authorizationInterceptor"/>
      				<ref bean="exportInterceptor"/>
      			</list>
      		</property>
      		<property name="mappings">
      			<props>
      				<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}">
      					beschaffungPlanungController</prop>
      				<prop key="${view.mapping.url.deleteauspuffanlage}">
      					deleteAuspuffanlageController</prop>
      				<prop key="${view.mapping.url.deletebeschaffungplanung}">
      					deleteBeschaffungPlanungController</prop>
      				<prop key="${view.mapping.url.einsatz}">einsatzController</prop>
      				<prop key="${view.mapping.url.editeinsatz}">editEinsatzController</prop>
      				<prop key="${view.mapping.url.editbeschaffungplanung}">
      					editBeschaffungPlanungController</prop>
      				<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>
      			</props>
      		</property>
      		<property name="lazyInitHandlers" value="true"/>
      	</bean>
      	<bean id="viewResolver"
      		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
      		<property name="viewClass">
      			<value>org.springframework.web.servlet.view.JstlView</value>
      		</property>
      		<property name="prefix">
      			<value>WEB-INF/jsp/secure/</value>
      		</property>
      		<property name="suffix">
      			<value>.jsp</value>
      		</property>
      	</bean>
      
      		
      	<!-- Interceptors -->
      	<bean id="authorizationInterceptor" 
      		class="com.bmw.auspuffanlagen.service.interceptor.AuthorizationInterceptor" >
      		<property name="messageHelper" ref="messageSource" />
      	</bean>
      	<bean id="exportInterceptor" 
      		class="com.bmw.auspuffanlagen.service.interceptor.ExportInterceptor" />
      The key is /auspuffanlage.htm, described in a properties file.

      I'm not sure if this helps you.

      Thanks again for your kind support.

      Dominik

      Comment


      • #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 :-)

        Dominik

        Comment

        Working...
        X