1 16 package org.apache.cocoon.forms.formmodel; 17 18 25 public class SubmitDefinition extends ActionDefinition { 26 27 private boolean validateForm; 28 29 32 public void initializeFrom(WidgetDefinition definition) throws Exception { 33 super.initializeFrom(definition); 34 35 if(definition instanceof SubmitDefinition) { 36 SubmitDefinition other = (SubmitDefinition)definition; 37 38 this.validateForm = other.validateForm; 39 40 } else { 41 throw new Exception ("Definition to inherit from is not of the right type! (at "+getLocation()+")"); 42 } 43 } 44 45 public void setValidateForm(boolean validateForm) { 46 checkMutable(); 47 this.validateForm = validateForm; 48 } 49 50 public Widget createInstance() { 51 return new Submit(this, validateForm); 52 } 53 } 54 | Popular Tags |