You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Don Brown (JIRA)" <ji...@apache.org> on 2006/09/13 05:15:31 UTC

[jira] Resolved: (WW-1400) validation.xml and action calls

     [ http://issues.apache.org/struts/browse/WW-1400?page=all ]

Don Brown resolved WW-1400.
---------------------------

    Resolution: Not A Problem

Um, I believe you meant to file this ticket against the Struts 1 project?  That XML looks like commons-validator, which isn't used in Struts 2. :)

> 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