public class HelloWorldAction implements ActionBean
{
@ValidateNestedProperties(
{
@Validate(field = "firstName", required = true, on = {"hello"}),
@Validate(field = "age", required = true, minvalue = 13, on = {"hello"})
})
private Person person;
private ActionBeanContext context;
@DefaultHandler public Resolution index()
{
return new ForwardResolution("Hello.jsp");
}
public Resolution hello()
{
return new ForwardResolution("SayHello.jsp");
}
public void setPerson(String person) {this.person = person;}
public String getPerson() { return person;}
public void setContext(ActionBeanContext c) {this.context = c; }
public ActionBeanContext getContext() {return context; }} |