Skip to content

Commit fa72186

Browse files
committed
Expose checkbox field marker as 'hidden' to RequestDataValueProcessor
Issue: SPR-17147
1 parent b8b6367 commit fa72186

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -233,7 +233,7 @@ protected int writeTagContent(TagWriter tagWriter) throws JspException {
233233
tagWriter.writeAttribute("type", "hidden");
234234
String name = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + getName();
235235
tagWriter.writeAttribute("name", name);
236-
tagWriter.writeAttribute("value", processFieldValue(name, "on", getInputType()));
236+
tagWriter.writeAttribute("value", processFieldValue(name, "on", "hidden"));
237237
tagWriter.endTag();
238238
}
239239

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxesTag.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -242,7 +242,7 @@ protected int writeTagContent(TagWriter tagWriter) throws JspException {
242242
tagWriter.writeAttribute("type", "hidden");
243243
String name = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + getName();
244244
tagWriter.writeAttribute("name", name);
245-
tagWriter.writeAttribute("value", processFieldValue(name, "on", getInputType()));
245+
tagWriter.writeAttribute("value", processFieldValue(name, "on", "hidden"));
246246
tagWriter.endTag();
247247
}
248248

0 commit comments

Comments
 (0)