public final class DtObjectErrors extends Object
| Constructor and Description |
|---|
DtObjectErrors() |
| Modifier and Type | Method and Description |
|---|---|
void |
addError(MessageText messageText)
Add a global error on the object (for example two fields values that a not compatibles)
|
void |
addError(String fieldName,
MessageText messageText)
Add an error associated to a field with a specific message
|
void |
clearErrors()
Clears all errors.
|
void |
clearErrors(String fieldName)
Clear all errors linked to a specific field
|
void |
flushIntoMessageStack(String contextKey,
UiMessageStack uiMessageStack)
Flush all messages in the given messageStack
|
boolean |
hasError()
Returns if the object has any error
|
boolean |
hasError(String fieldName)
Returns if a given field has errors.
|
public boolean hasError()
public boolean hasError(String fieldName)
fieldName - the fieldName (camelCase)public void clearErrors(String fieldName)
fieldName - the fieldName (camelCase)public void clearErrors()
public void addError(MessageText messageText)
messageText - the error messagepublic void addError(String fieldName, MessageText messageText)
fieldName - the fieldName (camelCase) concerned by the errormessageText - the error messagepublic void flushIntoMessageStack(String contextKey, UiMessageStack uiMessageStack)
contextKey - the key that will be associated with the error (for display)uiMessageStack - the stack in which messages must be storedCopyright © 2019. All Rights Reserved.