Don't display 'null' as the default value if we haven't got one, har!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1191 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: FormTool.java,v 1.8 2003/07/04 01:29:16 mdb Exp $
|
||||
// $Id: FormTool.java,v 1.9 2003/08/12 18:31:21 eric Exp $
|
||||
//
|
||||
// samskivert library - useful routines for java programs
|
||||
// Copyright (C) 2001 Michael Bayne
|
||||
@@ -322,7 +322,11 @@ public class FormTool
|
||||
{
|
||||
String value = ParameterUtil.getParameter(_req, name, true);
|
||||
if (StringUtil.blank(value)) {
|
||||
value = String.valueOf(defaultValue);
|
||||
if (defaultValue == null) {
|
||||
value = "";
|
||||
} else {
|
||||
value = String.valueOf(defaultValue);
|
||||
}
|
||||
}
|
||||
return HTMLUtil.entify(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user