wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts Validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validator" Watch "Struts Validator" New topic
Author

Struts Validator

manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
hi Everybody,
our customr wants the errors messages to be displayed as alerts. At the same time, we have been asked to use Struts validator frame work. Is it possible with teh Struts validator framework to display teh error messages as alerts..
please advise..
thanks


MT
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
do anyone of you have any suggestions on this>??
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by M K Raman:
do anyone of you have any suggestions on this>??

Yes it is possible to have error checkings done on the client (browser) and the web tier ( ie after the form submits).
Check the examples that ships with struts. The validator-rules.xml file has javascript functions that do the error checking on the client.
The alerts are shown accodingly.
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Have a look at this article


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Andres/Karthik
thanks for the information.
Basically, I am very new to struts... And I am a bit confused now..
just yesterday, I implemented error messages..
like usning teh stuff <html:errors/> and <html:erros propert="usename"/> ... ActionErrors ...etc etc...
But, i have not used any validatiuon.xml or validator_rules.xml ..
Are there two approaches for Error handling in Struts??
What is teh difference...
Please help me understanding this...
[ October 06, 2003: Message edited by: M K Raman ]
 
 
subject: Struts Validator