struts-user mailing list archives

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

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:

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


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message