1 16 package org.apache.cocoon.forms.formmodel; 17 18 19 24 public class UnionDefinition extends AbstractContainerDefinition { 25 private String caseWidgetId; 26 27 52 53 56 public void initializeFrom(WidgetDefinition definition) throws Exception { 57 super.initializeFrom(definition); 58 59 if(definition instanceof UnionDefinition) { 60 UnionDefinition other = (UnionDefinition)definition; 61 this.caseWidgetId = other.caseWidgetId; 62 63 } else { 64 throw new Exception ("Definition to inherit from is not of the right type! (at "+getLocation()+")"); 65 } 66 } 67 68 public void setCaseWidgetId(String id) { 69 checkMutable(); 70 caseWidgetId = id; 71 } 72 73 public String getCaseWidgetId() { 74 return caseWidgetId; 75 } 76 77 public Widget createInstance() { 78 Union unionWidget = new Union(this); 79 return unionWidget; 80 } 81 } 82 | Popular Tags |