fixed JSP ErrorsTag to avoid invalid "*.errors" id, using form object name as id prefix instead (SPR-7258)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3384 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2010-06-07 19:22:53 +00:00
parent 696c1f497b
commit 8e090e5fc4
2 changed files with 35 additions and 5 deletions
@@ -112,7 +112,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
@Override
protected String autogenerateId() throws JspException {
String path = getPropertyPath();
if ("".equals(path)) {
if ("".equals(path) || "*".equals(path)) {
path = (String) this.pageContext.getAttribute(
FormTag.MODEL_ATTRIBUTE_VARIABLE_NAME, PageContext.REQUEST_SCOPE);
}