1 16 package org.apache.cocoon.forms.formmodel; 17 18 import org.apache.cocoon.forms.util.DomHelper; 19 import org.w3c.dom.Element ; 20 21 26 public class ExpandDefinitionBuilder extends AbstractWidgetDefinitionBuilder { 27 28 public WidgetDefinition buildWidgetDefinition(Element element) throws Exception { 29 String id = DomHelper.getAttribute(element, "id"); 30 31 WidgetDefinition definition = context.getLocalLibrary().getDefinition(id); 32 33 if(definition == null) 34 throw new Exception ("Widget '"+id+"' not found! (at "+DomHelper.getLocation(element)+")"); 35 36 return definition; 37 } 38 } 39 | Popular Tags |