FileDocCategorySizeDatePackage
BeerSelectForm.javaAPI DocExample851Sat Jun 26 17:46:06 BST 2004com.example.web

BeerSelectForm

public class BeerSelectForm extends org.apache.struts.action.ActionForm

Fields Summary
private String
color
private static final String
VALID_COLORS
Constructors Summary
Methods Summary
public java.lang.StringgetColor()

    return color;
  
public voidsetColor(java.lang.String color)

    this.color = color;
  
public org.apache.struts.action.ActionErrorsvalidate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)


     
			         
    ActionErrors errors = new ActionErrors();

    if ( VALID_COLORS.indexOf(color) == -1 ) {
      errors.add("color", new ActionError("error.colorField.notValid"));
    }

    return errors;