1
2
3
4
5
6 package org.weda.tapestry.component;
7
8 import org.weda.Constants;
9
10 /**
11 *
12 * @author Mikhail Titov
13 */
14 public abstract class EditorErrorComponent extends EditorGroupComponent {
15 public String getEditorErrorClass(){
16 return Constants.EDITOR_ERROR_CLASS;
17 }
18
19 public boolean hasError(){
20 return getEditorGroup().getErrorMessages().containsKey(getModelName());
21 }
22 public String getErrorMessage(){
23 return getEditorGroup().getErrorMessages().get(getModelName()).getMessage();
24 }
25 }