-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Bjarte Andre Eide opened SPR-6710 and commented
In the following jsp-example, Spring does not discover the formatting annotations attached to the discount-property.
<spring:bind path="orderItems[0].discount">
${status.displayValue}
</spring:bind>
The problem can be traced back to the two following lines in org.springframework.beans.BeanWrapperImpl
358 String canonicalName = PropertyAccessorUtils.getPropertyName(propertyName);
359 PropertyDescriptor pd = getPropertyDescriptorInternal(canonicalName);
If line 358 is replaced with 'canonicalName = propertyName', everything works fine. However I do not know if this will break other code if line 358 is removed/replaced.
The following stacktrace shows the entry for how the jsp is accessing the BeanWrapperImpl:
org.springframework.beans.BeanWrapperImpl.getPropertyTypeDescriptor(BeanWrapperImpl.java:358)
org.springframework.validation.AbstractPropertyBindingResult.findEditor(AbstractPropertyBindingResult.java:154)
org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:125)
org.springframework.web.servlet.tags.BindTag.doStartTagInternal(BindTag.java:119)
org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:78)
Attached zip-file contains some tests that fails when one of the path-element is a list/array
Affects: 3.0 GA
Attachments:
- test-bind.zip (22.96 kB)
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug