1 15 package tutorial.forms; 16 17 import net.sf.tapestry.IRequestCycle; 18 import net.sf.tapestry.RequestCycleException; 19 import net.sf.tapestry.form.IPropertySelectionModel; 20 import net.sf.tapestry.form.StringPropertySelectionModel; 21 import net.sf.tapestry.html.BasePage; 22 import net.sf.tapestry.valid.ValidationDelegate; 23 24 28 public class Part4 extends BasePage 29 { 30 public void enterDetails(IRequestCycle cycle) throws RequestCycleException 31 { 32 ValidationDelegate delegate = (ValidationDelegate) getBeans().getBean("delegate"); 34 if (delegate.getHasErrors()) 35 { 36 return; 38 } 39 40 cycle.setPage("Success"); 41 } 42 43 46 public static IPropertySelectionModel getColourModel() 47 { 48 return new StringPropertySelectionModel( 49 new String []{"Black", "Fiji Blue", "Green", "Red", "Yellow"}); 50 } 51 } 52 | Popular Tags |