You can use html:submit tag for search button and html:cancel tag for others. Struts will bypass validation when those buttons are pressed.
I understand this will work, if I use the regular Struts Action. If I use with LookupDispatchAction, I get the error "does not contain handler parameter named parameter". I think it is because LookupDispatch expects property in submit to match the parameter field value defined in struts config. But I have left the property field blank as adviced in html:cancel tag description
"Property - Name of the request parameter that will be included with this submission, set to the specified value. WARNING - If you set this attribute to a value other than the default, this will NOT be recognized as the cancel key by the Struts controller
servlet or the Action.isCancelled() method. You will need to do your own cancel detection."
The struts API for Lookup dispatch action quotes
"If the submit was cancelled (a html:cancel button was pressed), the custom handler cancelled will be used instead. "
Could you suggest, what I can do?
[ December 23, 2008: Message edited by: Deena dayal Jeyachandran ]