Skip to content

formMultiSelect macro in spring.ftl causes freemarker.template.TemplateException [SPR-7721] #12377

@spring-projects-issues

Description

@spring-projects-issues

Jakub Głuszecki opened SPR-7721 and commented

formMultiSelect macro from spring.ftl causes following exception:

freemarker.template.TemplateException: Expected collection or sequence. list evaluated instead to freemarker.template.SimpleScalar on line 368, column 12 in spring.ftl.

This is the problematic line:

<#assign isSelected = contains(status.value?default([""]), value)>

status.value returns String instead of a Collection
(value is converted to String in AbstractPropertyBindingResult#formatFieldValue)
status.actualValue should be used instead.


Affects: 3.0.4, 3.0.5, 3.1 RC1

Referenced from: commits 61a5ab9, bfabd58

2 votes, 2 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions