public class ElementErrorHandler extends Object implements ErrorHandler
FieldError
instance that calls setInnerHTML on a target
element. The target element can be specified directly or via a element id.Modifier and Type | Field and Description |
---|---|
protected Element |
element |
protected String |
elementId |
Constructor and Description |
---|
ElementErrorHandler(Element element) |
ElementErrorHandler(String elementId) |
Modifier and Type | Method and Description |
---|---|
void |
clearInvalid()
Clears the errors from the field.
|
Element |
getElement() |
String |
getElementId() |
void |
markInvalid(List<EditorError> errors)
Assigns errors to be displayed on the field.
|
void |
release()
Called to indicate that the instance will no longer be used, and should clean itself up.
|
void |
setElement(Element element) |
void |
setElementId(String elementId) |
protected String elementId
protected Element element
public ElementErrorHandler(String elementId)
public ElementErrorHandler(Element element)
public Element getElement()
public void setElement(Element element)
public String getElementId()
public void setElementId(String elementId)
public void clearInvalid()
ErrorHandler
clearInvalid
in interface ErrorHandler
public void markInvalid(List<EditorError> errors)
ErrorHandler
markInvalid
in interface ErrorHandler
errors
- the errors to display to the userpublic void release()
ErrorHandler
ErrorHandler.clearInvalid()
method should be called prior to this to clean up any leftover errors.release
in interface ErrorHandler
Copyright © 2018. All rights reserved.