Expose checkbox field marker as 'hidden' to RequestDataValueProcessor

Issue: SPR-17147

(cherry picked from commit fa72186e28)
This commit is contained in:
Juergen Hoeller
2018-08-08 23:52:24 +02:00
parent 5515112f87
commit bd060a19ac
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2018 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.
@@ -57,7 +57,7 @@ public class CheckboxTag extends AbstractSingleCheckedElementTag {
tagWriter.writeAttribute("type", "hidden");
String name = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + getName();
tagWriter.writeAttribute("name", name);
tagWriter.writeAttribute("value", processFieldValue(name, "on", getInputType()));
tagWriter.writeAttribute("value", processFieldValue(name, "on", "hidden"));
tagWriter.endTag();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2018 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.
@@ -44,7 +44,7 @@ public class CheckboxesTag extends AbstractMultiCheckedElementTag {
tagWriter.writeAttribute("type", "hidden");
String name = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + getName();
tagWriter.writeAttribute("name", name);
tagWriter.writeAttribute("value", processFieldValue(name, "on", getInputType()));
tagWriter.writeAttribute("value", processFieldValue(name, "on", "hidden"));
tagWriter.endTag();
}