01: package org.strecks.actiontest.form;
02:
03: import org.apache.struts.action.ActionForm;
04: import org.strecks.bind.annotation.BindSimple;
05: import org.strecks.validator.annotation.ValidateInteger;
06: import org.strecks.validator.annotation.ValidateRequired;
07:
08: public class ExampleActionForm extends ActionForm {
09:
10: private static final long serialVersionUID = 7423616982362263002L;
11:
12: private String numberField;
13:
14: private DomainObject domainObject;
15:
16: @BindSimple(expression="domainObject.numberField")
17: public String getNumberField() {
18: return numberField;
19: }
20:
21: @ValidateRequired(key="number.required")
22: @ValidateInteger(key="field.must.be.number")
23: public void setNumberField(String numberField) {
24: this .numberField = numberField;
25: }
26:
27: public DomainObject getDomainObject() {
28: return domainObject;
29: }
30:
31: public void setDomainObject(DomainObject domainObject) {
32: this.domainObject = domainObject;
33: }
34:
35: }
|