Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes Mandatory fields validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Mandatory fields validation" Watch "Mandatory fields validation" New topic

Mandatory fields validation

rudresh kumar
Ranch Hand

Joined: Jan 04, 2006
Posts: 83
HI All,

I have a 15 jsp's (personal info, work info, address info,....) all embedded in main jsp. I have put fields of all jsp in same form bean.

When i submit jsp, i need to validate that if mandatory fields are filled. I can do this in validate method or validator xml. But the problem here is all 15 is not loaded at once. i request one jsp at a time. so when i submit the page only one page will be available, so i cannot use javascript.

i can proceed with validate method or validator xml given by struts but even here problem the jsp is loaded based on some condition
for example if the user has said that he is working then i dynamically load the work info jsp. now when i submit the jsp how can i dynamically say that i have loaded the work info jsp. so now you validate for mandatory fields in struts. I hope i am clear.

Thanks in advance
I agree. Here's the link:
subject: Mandatory fields validation
It's not a secret anymore!