I get a 'Validation Failed' error message when I run my code...
I suspect that my naming convention for the getters and setters methods in my
ActionForm class may not be
correct...
I think it is the contactId param that must be causing the problem.
What should the getters and setters for contactId be called?
// This is my ActionForm class
package com.db.gcp.lemweb.blotter.contacts;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;
//-----------------------------------------------------------------------------------------------
// Author: Mehran Zonouzi
// Date: 15/09/2003
// Purpose: This bean saves the param values that are to be
// used with the EditContactAction class
//------------------------------------------------------------------------------------------------
public final class EditContactForm extends ActionForm {
private String page = null;
private String contactId = null;
// The usual getter and setter methods for beans
public String getContactId(){
return (this.contactId);
}
public void setContactId(String contactId){
this.contactId = contactId;
}
public String getPage(){
return (this.page);
}
public void setPage(String page){
this.page = page;
}
// This method performs the form validation
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
ActionErrors errors = new ActionErrors() ;
if ( page == null || "".equals(page)){
errors.add("page", new ActionError("error.page"));
}
if ( contactId == null || "".equals(contactId)){
errors.add("contactid", new ActionError("error.contactid"));
}
return errors;
}
}
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]