From f07c9f1ac39ed5db5cebf08b7b624c0ae3e16cc7 Mon Sep 17 00:00:00 2001 From: mdb Date: Tue, 25 Jan 2005 22:33:55 +0000 Subject: [PATCH] git-svn-id: https://samskivert.googlecode.com/svn/trunk@1581 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/velocity/FormTool.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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("