struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens v.P. <develo...@jevopi.de>
Subject Re: Validation on first page impression
Date Thu, 17 Jul 2003 15:24:04 GMT
Hello,

Am Donnerstag, 17.07.03 um 16:31 Uhr schrieb Wendy Smoak:

>> I'm wondering how to suppress form validation when a form is  shown 
>> the
>> first time to the user.
>
> Search the list archives, this has come up before.  I override the 
> validate
> method and decide whether or not to call super.validate().  On the 
> first
> page view, the form will not have been "submitted" so you can check 
> whether
> the request was POSTed, put a hidden field on the form and look for it 
> in
> the request, etc.
>
thank you... usually I do that - searching the list archives... sorry.

I found the thread and it was in deed exactly my question - but I don't 
like the solutions.
I've made it as you suggested - but I don't need a hidden field for 
that - the submit button sends a value which can be checked whether 
it's null or empty.

But still I don't like this solution. Isn't it possible to tell the 
validation framework exactly what I'm doing "manually"? Like a 
construct in the validation.xml like this:

<formset>
	<form name="someform">
  		<field property="somedata" depends="..." >..</field>
   		..
		<field property="submit" nullReflectsFirstImpession="true" />
	</form>
</formset>

Jens


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message