File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Validation # 4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validation # 4" Watch "Validation # 4" New topic

Validation # 4

omkar patkar
Ranch Hand

Joined: Aug 25, 2005
Posts: 231
Hi all,

I have one doubt in struts validation. i have used, "required" rule in my validation. And i am using client side validation of Struts. When i enter spaces in a particular field at and when i click on submit.... the alert window pops-up ....saying that particular field is required. After clicking on OK, the focus is maintained on that field. I want the field to get cleared, or atleast the entered text must get selected. Is their any facility in struts 1.2.8 to achieve this ? Thanks in advance.

Thanks and regards
Omkar Patkar

Thanks and Regards
Omkar Patkar (SCJP 1.4)[url][/url] | [url][/url]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There is no "out of the box" facility to do this. One option would be to simply write your own client-side validation code outside of the validation framework, or possibly even along-side the framework code. If it's really important to you to use the validation framework, I'd suggest downloading the source code and seeing if you can make an extension to do what you want to do.

Consultant, Sima Solutions
omkar patkar
Ranch Hand

Joined: Aug 25, 2005
Posts: 231
Hmmm .... thanks Merill.
I agree. Here's the link:
subject: Validation # 4
It's not a secret anymore!