1 15 package org.apache.tapestry.wml; 16 17 import org.apache.tapestry.IMarkupWriter; 18 import org.apache.tapestry.IRequestCycle; 19 import org.apache.tapestry.form.IPropertySelectionModel; 20 21 28 public abstract class SelectionField extends AbstractPostfield 29 { 30 33 protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle) 34 { 35 String optionValue = cycle.getParameter(getName()); 36 IPropertySelectionModel model = getModel(); 37 Object value = (optionValue == null) ? null : model.translateValue(optionValue); 38 39 updateValue(value); 40 } 41 42 public abstract IPropertySelectionModel getModel(); 43 } | Popular Tags |