SelectTag correctly detects multiple="true" again

Issue: SPR-11678
This commit is contained in:
Juergen Hoeller
2014-04-09 17:42:32 +02:00
parent 1f2d5b5d89
commit 8d8766dda9
2 changed files with 34 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -249,7 +249,8 @@ public class SelectTag extends AbstractHtmlInputElementTag {
private boolean isMultiple() throws JspException {
Object multiple = getMultiple();
if (Boolean.TRUE.equals(multiple) || "multiple".equals(multiple)) {
if (multiple != null && (Boolean.TRUE.equals(multiple) ||
Boolean.parseBoolean(multiple.toString()) || "multiple".equals(multiple))) {
return true;
}
return forceMultiple();