|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.vaadin.data.Validator.InvalidValueException
public static class Validator.InvalidValueException
Exception that is thrown by a Validator
when a value is invalid.
The default implementation of InvalidValueException does not support HTML
in error messages. To enable HTML support, override
getHtmlMessage()
and use the subclass in validators.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.terminal.Paintable |
---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
Field Summary |
---|
Fields inherited from interface com.vaadin.terminal.ErrorMessage |
---|
CRITICAL, ERROR, INFORMATION, SYSTEMERROR, WARNING |
Constructor Summary | |
---|---|
Validator.InvalidValueException(String message)
Constructs a new InvalidValueException with the specified
message. |
|
Validator.InvalidValueException(String message,
Validator.InvalidValueException[] causes)
Constructs a new InvalidValueException with a set of causing
validation exceptions. |
Method Summary | |
---|---|
void |
addListener(Paintable.RepaintRequestListener listener)
Error messages are inmodifiable and thus listeners are not needed. |
Validator.InvalidValueException[] |
getCauses()
Returns the InvalidValueExceptions that caused this
exception. |
String |
getDebugId()
Get's currently set debug identifier |
int |
getErrorLevel()
Gets the errors level. |
protected String |
getHtmlMessage()
Returns the message of the error in HTML. |
boolean |
isInvisible()
Check if the error message should be hidden. |
void |
paint(PaintTarget target)
Paints the Paintable into a UIDL stream. |
void |
removeListener(Paintable.RepaintRequestListener listener)
Error messages are inmodifiable and thus listeners are not needed. |
void |
requestRepaint()
Error messages are inmodifiable and thus listeners are not needed. |
void |
requestRepaintRequests()
Request sending of repaint events on any further visible changes. |
void |
setDebugId(String id)
Adds an unique id for component that get's transferred to terminal for testing purposes. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Validator.InvalidValueException(String message)
InvalidValueException
with the specified
message.
message
- The detail message of the problem.public Validator.InvalidValueException(String message, Validator.InvalidValueException[] causes)
InvalidValueException
with a set of causing
validation exceptions. The causing validation exceptions are included
when the exception is painted to the client.
message
- The detail message of the problem.causes
- One or more InvalidValueException
s that caused
this exception.Method Detail |
---|
public boolean isInvisible()
public final int getErrorLevel()
ErrorMessage
getErrorLevel
in interface ErrorMessage
public void paint(PaintTarget target) throws PaintException
Paintable
Paints the Paintable into a UIDL stream. This method creates the UIDL sequence describing it and outputs it to the given UIDL stream.
It is called when the contents of the component should be painted in response to the component first being shown or having been altered so that its visual representation is changed.
paint
in interface Paintable
target
- the target UIDL stream where the component should paint itself
to.
PaintException
- if the paint operation failed.protected String getHtmlMessage()
public void addListener(Paintable.RepaintRequestListener listener)
ErrorMessage
addListener
in interface ErrorMessage
addListener
in interface Paintable
listener
- the listener to be added.Paintable.addListener(Paintable.RepaintRequestListener)
public void removeListener(Paintable.RepaintRequestListener listener)
ErrorMessage
removeListener
in interface ErrorMessage
removeListener
in interface Paintable
listener
- the listener to be removed.Paintable.removeListener(Paintable.RepaintRequestListener)
public void requestRepaint()
ErrorMessage
requestRepaint
in interface ErrorMessage
requestRepaint
in interface Paintable
Paintable.requestRepaint()
public void requestRepaintRequests()
Paintable
This method is normally used only by the terminals to note paintables about implicit repaints (painting the component without actually invoking paint method).
requestRepaintRequests
in interface Paintable
public String getDebugId()
Paintable
getDebugId
in interface Paintable
public void setDebugId(String id)
Paintable
Note, that with the current terminal implementation the identifier cannot be changed while the component is visible. This means that the identifier should be set before the component is painted for the first time and kept the same while visible in the client.
setDebugId
in interface Paintable
id
- A short (< 20 chars) alphanumeric idpublic Validator.InvalidValueException[] getCauses()
InvalidValueExceptions
that caused this
exception.
InvalidValueExceptions
that
caused this exception. Returns an empty array if this
exception was not caused by other exceptions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |