From 2c1feb1380e8469e2abba1e0bed14332a93578ad Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 4 Nov 2003 23:06:59 +0000 Subject: [PATCH] Wow, I am the fixedXXX champion lately. Adding a fixedCheckbox that does not snag the value from the request. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1286 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/velocity/FormTool.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java b/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java index 08f8b041..67796e00 100644 --- a/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java +++ b/projects/samskivert/src/java/com/samskivert/velocity/FormTool.java @@ -1,5 +1,5 @@ // -// $Id: FormTool.java,v 1.13 2003/11/04 03:12:39 eric Exp $ +// $Id: FormTool.java,v 1.14 2003/11/04 23:06:59 eric Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -259,11 +259,21 @@ public class FormTool * default value. */ public String checkbox (String name, boolean defaultValue) + { + return + fixedCheckbox(name, ParameterUtil.isSet(_req, name, defaultValue)); + } + + /** + * Constructs a checkbox input field with the specified name and + * value. + */ + public String fixedCheckbox (String name, boolean value) { StringBuffer buf = new StringBuffer(); buf.append("");