• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

validator framework

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

I am using validator framework in my application. For client side validations I am writing the code validation-rules.xml. I would like to display the error messages which are defined in the application resources.
please let me know whether it is possible or not?

thanks in advance.
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There should be a basic implementation of the rules file that came with your struts or validator distribution. If you notice, it indeed uses properties specified in the ApplicationResources.properties -- so long as you specified it in your struts-config.xml file, anyway!

Consider...



Note the msg="errors.required" attribute.
 
pavanasree vasireddy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

Thanks for the reply.

I agree that "msg" attribute use ApplicationResources properties. In my application i would like to use javascript validations. I writing my javscript validations in the <javascript> tag in validation-rules.xml. I want to display the alert messages using application resources.
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably the following article would be helpful...

http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_struts.html
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic