diff --git a/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java b/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java index b822279d..627185cb 100644 --- a/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java +++ b/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java @@ -286,10 +286,20 @@ public class FormTool */ public String option ( String name, String value, String item, Object defaultValue) + { + String selectedValue = getValue(name, defaultValue); + return fixedOption(name, value, item, selectedValue); + } + + /** + * Constructs an option entry for a select menu with the specified + * name, value, item, and selected value. + */ + public String fixedOption ( + String name, String value, String item, Object selectedValue) { StringBuffer buf = new StringBuffer(); buf.append("