1 16 package org.apache.cocoon.forms.binding; 17 18 import org.apache.cocoon.forms.formmodel.Group; 19 import org.apache.cocoon.forms.formmodel.Widget; 20 import org.apache.commons.jxpath.JXPathContext; 21 22 33 public class GroupJXPathBinding extends ContextJXPathBinding { 34 35 private final String widgetId; 36 37 43 public GroupJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String widgetId, String xpath, JXPathBindingBase[] childBindings) { 44 super(commonAtts, xpath, childBindings); 45 this.widgetId = widgetId; 46 } 47 48 public String getId() { return widgetId; } 49 50 55 public void doLoad(Widget frmModel, JXPathContext jxpc) throws BindingException { 56 Group groupWidget = (Group)selectWidget(frmModel, this.widgetId); 57 super.doLoad(groupWidget, jxpc); 58 } 59 60 65 public void doSave(Widget frmModel, JXPathContext jxpc) throws BindingException { 66 Group groupWidget = (Group)selectWidget(frmModel, this.widgetId); 67 super.doSave(groupWidget, jxpc); 68 } 69 70 public String toString() { 71 return "GroupJXPathBinding [widget=" + this.widgetId + ", xpath=" + getXPath() + "]"; 72 } 73 } 74 | Popular Tags |