FileDocCategorySizeDatePackage
GangsterForm.javaAPI DocApache Struts 2.0.9 Apps3226Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.integration

GangsterForm

public class GangsterForm extends org.apache.struts.validator.ValidatorForm

Fields Summary
private String
name
private String
age
private String
description
private boolean
bustedBefore
Constructors Summary
Methods Summary
public java.lang.StringgetAge()

return
the age

        return age;
    
public java.lang.StringgetDescription()

return
the description

        return description;
    
public java.lang.StringgetName()

return
the name

        return name;
    
public booleanisBustedBefore()

return
the bustedBefore

        return bustedBefore;
    
public voidreset(org.apache.struts.action.ActionMapping arg0, javax.servlet.http.HttpServletRequest arg1)

        bustedBefore = false;
    
public voidsetAge(java.lang.String age)

param
age the age to set

        this.age = age;
    
public voidsetBustedBefore(boolean bustedBefore)

param
bustedBefore the bustedBefore to set

        this.bustedBefore = bustedBefore;
    
public voidsetDescription(java.lang.String description)

param
description the description to set

        this.description = description;
    
public voidsetName(java.lang.String name)

param
name the name to set

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

        ActionErrors errors = super.validate(mapping, request);
        if (name == null || name.length() == 0) {
            errors.add("name", new ActionMessage("The name must not be blank"));
        }

        return errors;