Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Release 1.5
-
Fix Version/s: None
-
Component/s: Tag Library
-
Labels:None
Description
Auto focus on error does not work for map fields.
For example,
<stripes:text name="fieldMap[field1]"/>
And in the ActionBean,
@ValidateNestedProperties( {
@Validate(field="field1", required=true)
})
private Map<String, String> fieldMap;
Validation works as expected. But the auto focus doesn't work and i see the following in the logs.
SEVERE: Form with action [/test/Test.action] has 'focus' set to '', but did not find a field with matching name to set focus on.
Stepping through the code in the IDE showed that the "setFocusOnFieldIfRequired" method in FormTag class doesn't find the field because the field name in the Validation error is "fieldMap.field1" ( vs "fieldMap[field1]" in the Form/JSP ).
Shouldn't the original field name be preserved ?
i originally thought that validation worked...It doesn't. I always get the "field is required" message.. even if i enter a value.
Does validation work for Map fields ? How do you specify validation for map fields ?