wood burning stoves 2.0*
The moose likes Struts and the fly likes Validator Framework - Can we use same ActionForm for two different UI ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validator Framework - Can we use same ActionForm for two different UI ?" Watch "Validator Framework - Can we use same ActionForm for two different UI ?" New topic
Author

Validator Framework - Can we use same ActionForm for two different UI ?

Vicky Mohan
Ranch Hand

Joined: Oct 14, 2004
Posts: 130
We are using validator framework provided by struts.

We have a scenario where a single ActionForm is being used by two different pages.

If there are four elements in them, we need to validate two form elements for one Page and the other two form elements for the other page.

I am not sure where we need to specify the parameters( if there are any) for the validator framework to understand the correct validation that needs to be done.

Any help will be appreciated
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

If you list the ActionForm twice as two different names in form-beans of struts-config, using one for each Action, it becomes very simple to tell the difference between them in the validation framework.


A good workman is known by his tools.
Vicky Mohan
Ranch Hand

Joined: Oct 14, 2004
Posts: 130
Thanks Mark.

I thought about this option too, but i was thinking if i had any option to specify the particular Action Class that gets submitted in the Validator.xml file for my validations.

Thanks for your suggestion.
 
 
subject: Validator Framework - Can we use same ActionForm for two different UI ?