Urlencoded Field Name?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Urlencoded Field Name?

This post was updated on .

in order to build a Map of Checkboxes I'm using the following attributes on a checkbox:
th:field="*{features['__${searchFeatureInfo.code}__']}" th:value="${searchFeatureInfoValue.value}"

This is the field of the java bean (+ getter/setter):
Map<String, List<String>> features

After submitting the form (with method GET) Tomcat is complaining about the square brackets in the URL (which isn't a valid char and should be encoded) and returning HTTP 400 without even forwarding the request to my webapp.

On another form it works curiously.

Is there any way to encode the query string parameter?

th:name="|features['${searchFeatureInfo.code}']|" th:value="${searchFeatureInfoValue.value}" th:checked="..."
 is working.

I guess this is a Thymeleaf bug?