1 15 package org.apache.tapestry.workbench.fields; 16 17 import java.math.BigDecimal ; 18 19 import org.apache.tapestry.IRequestCycle; 20 import org.apache.tapestry.html.BasePage; 21 import org.apache.tapestry.valid.IValidationDelegate; 22 23 27 28 public abstract class Fields extends BasePage 29 { 30 public static final int INT_MIN = 5; 31 32 public static final int INT_MAX = 20; 33 34 public static final double DOUBLE_MIN = 3.14; 35 36 public static final double DOUBLE_MAX = 27.5; 37 38 public static final BigDecimal DECIMAL_MIN = new BigDecimal ("2"); 39 40 public static final BigDecimal DECIMAL_MAX = new BigDecimal ( 41 "100.123456234563456734563456356734567456784567456784567845675678456785678"); 42 43 public static final long LONG_MIN = 6; 44 45 public static final long LONG_MAX = 21; 46 47 public static final int STRING_MIN_LENGTH = 3; 48 49 public void formSubmit(IRequestCycle cycle) 50 { 51 IValidationDelegate delegate = getDelegate(); 52 53 55 57 if (!delegate.getHasErrors()) 58 cycle.activate("FieldsResults"); 59 } 60 61 66 public abstract IValidationDelegate getDelegate(); 67 } | Popular Tags |