You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Robert Breidecker <rb...@yahoo.com> on 2005/04/21 21:52:22 UTC

What to show when field fails validation?

Now that I've moved past my last problem... :)

If I have a field (inputText) that fails validation,
should the value that is displayed when the page is
displayed show the original value or the invalid value
that was rejected by the validator?

The behavior I am seeing is that the original value is
being displayed.

I have another numberic field that when it fails
conversion, it still displays the invalid character I
typed into it.

Thanks,
Rob Breidecker


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

Re: What to show when field fails validation?

Posted by Heath Borders <he...@gmail.com>.
Generally, its up to the renderer to decide that, but I think most of the 
standard MyFaces renderers first check for a submitted value and then check 
for a regular value only if the submitted value is null. I think that all 
renderers should have this behavior, and it should probably be a best 
practice in the spec, if such things exist.

On 4/21/05, Rob Decker <ro...@objectsource.org> wrote: 
> 
> I think it should show the value that failed validation so that the user 
> sees what the
> failed validation is refering to.
> 
> --
> Rob
> 
> @objectsource.org <http://objectsource.org>
> 
> 
> ---------- Original Message -----------
> From: Robert Breidecker <rb...@yahoo.com>
> To: MyFaces Discussion <us...@myfaces.apache.org>
> Sent: Thu, 21 Apr 2005 12:52:22 -0700 (PDT)
> Subject: What to show when field fails validation?
> 
> > Now that I've moved past my last problem... :)
> >
> > If I have a field (inputText) that fails validation,
> > should the value that is displayed when the page is
> > displayed show the original value or the invalid value
> > that was rejected by the validator?
> >
> > The behavior I am seeing is that the original value is
> > being displayed.
> >
> > I have another numberic field that when it fails
> > conversion, it still displays the invalid character I
> > typed into it.
> >
> > Thanks,
> > Rob Breidecker
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - Find what you need with new enhanced search.
> > http://info.mail.yahoo.com/mail_250
> ------- End of Original Message -------
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: What to show when field fails validation?

Posted by Rob Decker <ro...@objectsource.org>.
I think it should show the value that failed validation so that the user sees what the 
failed validation is refering to.

--
Rob

@objectsource.org


---------- Original Message -----------
From: Robert Breidecker <rb...@yahoo.com>
To: MyFaces Discussion <us...@myfaces.apache.org>
Sent: Thu, 21 Apr 2005 12:52:22 -0700 (PDT)
Subject: What to show when field fails validation?

> Now that I've moved past my last problem... :)
> 
> If I have a field (inputText) that fails validation,
> should the value that is displayed when the page is
> displayed show the original value or the invalid value
> that was rejected by the validator?
> 
> The behavior I am seeing is that the original value is
> being displayed.
> 
> I have another numberic field that when it fails
> conversion, it still displays the invalid character I
> typed into it.
> 
> Thanks,
> Rob Breidecker
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Find what you need with new enhanced search. 
> http://info.mail.yahoo.com/mail_250
------- End of Original Message -------