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

This commit is contained in:
Juergen Hoeller
2010-06-07 19:22:53 +00:00
parent cc238207f9
commit 53cdb9dfeb
2 changed files with 35 additions and 5 deletions

View File

@@ -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);
}