Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Release 1.5.1
-
Fix Version/s: Release 1.5.2, Release 1.6
-
Component/s: Tag Library
-
Labels:None
-
Environment:Linux (doubt it matters)
Description
For indexed bean properties, the metadata map is built such that the indexing notation (square brackets around a numeric index value) isn't there. That is, the DefaultValidationMetadataProvider stashes the metadata in the cache with a plain-looking property path.
When the field-metadata tag code goes about its business of providing metadata for all properties mentioned in a form, it doesn't strip out the indexing notation from form field names when looking for metadata. Because of the way the map is built, it doesn't find the metadata.
A workaround is to include a hidden disabled dummy field in the form whose name is an indexed property field name minus the index. This is made a little more difficult than it sounds because the <s:hidden> tag does not allow the "disabled" attribute to be provided.
This might not be "major", but it doesn't seem "minor" either. That's just me however.
Fixed for 1.5.2 (r1164) and 1.6 (r1165). Parameter names returned by FormTag.getRegisteredFields() are now stripped before use.