• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

struts client side validation

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have gone through struts validator framework.
Currently we have to implement only client side validation using struts validator framework in our project.

We have requirement where we have one drop down with values YES and NO. When I select YES , then one text box is displayed and in this case only, contents of textbox becomes mandatory.
If I select NO, then contents of textbox is not mandatory.

I think , requiredif or validwhen can resolve my problem.

I have checked in struts documentation but it does not clearly specify , whether they are server side and which are client side validations [amongst the available in struts validator framework]

Further I checked below mentioned sites , which say that requiredif or validwhen are server side validations.
http://www.theserverside.com/discussions/thread.tss?thread_id=36950
http://mail-archives.apache.org/mod_mbox/struts-user/200604.mbox/%3C5F1761E7ABCC1B4C93A78CE3ECA1C8D50A1E57@essex01.ess.com%3E

Thus kindly help me on how to do client side validation which involves dependency.

I am using struts 1.2.7 version.

Regards,
Vishal
 
Ranch Hand
Posts: 94
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer to this Topic Validation using javascript
 
vishal Mestri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yogesh lonkar,

Thanks for your prompt response. Really appreciate , you took time out.

But sorry to say, my question is not answered.

As I want to implement dependency validations in client side javascript validation using Struts validator framework only..

Yesterday I searched on google and recommendation which I concluded is writing custom validation is way out.
Below mentioned in URL which I got.
http://www.raibledesigns.com/rd/date/20030226#struts_validator_validating_two_fields

Can someone confirm me whether , I am right track. or I am re-writing code, for which already components available in validator framework.

Just want to highlight again, My Objective is to achieve dependency validation through client side javascript validation through struts validator framework only.

Regards,
Vishal
 
Yogesh Lonkar
Ranch Hand
Posts: 94
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you actually want but here is LINK for struts2 validation framework tutorial. it will give you basic introduction to validations in struts2. I hope this is what you are looking for.
 
vishal Mestri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yogesh,

I am using struts 1.2.7 version. Currently , I can not upgrade due to some internal reasons.

I wanted dependency(if i select YES in one drop down , then only other text box becomes mandatory.Otherwise not.) client side validations through struts validator framework





Regards,
Vishal
 
vishal Mestri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I was able to create custom validations using existing javascript functions.
Still I am awaiting if any master has already coded for the same in struts.

Thanks and Regards,
Vishal
 
vishal Mestri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Please someone kindly confirm whether I am on right track by reading above posts.
I am afraid that , I am coding for stuff which is might be already available in struts.

Thanks and Regards,
Vishal
 
    Bookmark Topic Watch Topic
  • New Topic