View Javadoc

1   /*
2    * EditorErrorComponent.java
3    * Created on 13 Июль 2006 г., 22:52
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  }