File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Validator

 
manasa teja
Ranch Hand
Posts: 325
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
manasa teja
Ranch Hand
Posts: 325
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do anyone of you have any suggestions on this>??
 
Karthik Guru
Ranch Hand
Posts: 1209
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1561
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at this article
 
manasa teja
Ranch Hand
Posts: 325
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic