I have a class that extends DispatchAction so that i can perform Typical CRUD events (create, retrieve, update, and delete) I am having problems using validator with DispatchAction. I am using DynaActionForm. Is it possible to configure that for create and update perform the form validation and for retrieve and delete not to perform the validation. If so could any help me out. Thanks in advance.
rahul V kumar
posted 16 years ago
I found one of way doing it and it is helping me solve my purpose. If someone has a better way please let me know. I have my buttons <html:cancel> instead of <html:submit> We are supposed to do clean up or perform some function when someone selects <html:cancel> but I am using it to bypass the validation. Any better way out please let me know. Thanks
One way to do it is to create separate action-mappings for each CRUD action. Then turn on validation where appropriate. I usually just have a editObject and saveObject action-mapping, where the saveObject mapping has validate="true" and the edit has validate="false". HTH, Matt