validation.xml and action calls
-------------------------------

                 Key: WW-1400
                 URL: http://issues.apache.org/struts/browse/WW-1400
             Project: Struts 2
          Issue Type: Improvement
         Environment: linux,win2000,jboss
            Reporter: Geoff Simpson


The way the validation is currently working is not very well designed (unless 
i'm missing something). When the form validation fails the call is forwarded 
straight to the jsp. This means there is not chance to setup request / session 
objects for dynamic drop menu's in the jsp. There is a work around using 
validwhen but it's not very clean, it would be much better to call the execute 
method of the action script even when auto validation determines the page is 
not valid.

The work around is to use vadidwhen so that fill call (action is null) the 
validation will pass and the variables can be stored in the session.

<field property="country" depends="validwhen">
                <arg0 key="userRegistrationForm.country"/>
                                <var>
                                  <var-name>test</var-name>
                                  <var-value>((action == null) or (*this* != 
null))</var-value>
                                </var>
            </field> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to