• 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

Form validation in Struts

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends

can u explain how the form will go for validating it self when the folowing is the code snippet on Submiting a form called "ReceivingForm.jsp"

<html:form onsubmit="return validateReceivingForm(this);" styleClass="HEADER" action="/Receiving.do">

i searched for the conscern validate method in the respective Form Bean
"ReceivingForm.java"
and the other .js files but couldn't find any relevant method


Thanks in Advance
MVS
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hope this Struts Validator Guide help you.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MVS MVS,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

I'm thinking that MVS MVS is rather fictitious looking.

Thanks Pardner! Hope to see you 'round the Ranch!
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi MVM

See if u had configured the rules in validation.xml and when u come to that page the clinet side javscript will be rendered in the same page (try to see this by view source and u will get the javascript validations rendered in ur page)
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


See if u had configured the rules in validation.xml and when u come to that page the clinet side javscript will be rendered in the same page (try to see this by view source and u will get the javascript validations rendered in ur page)



How does it generate Javascript?
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

There is something called

<html:javascript method="validateForm" dynamicJavascript="true"/>

which will render u client side javascript validation also depnding on the rules in validation.xml ......

i hope u wont have a doubt still how will that render javascript code
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic