enum DisplayType
Enum representing the display behavior for a constrained property in scaffolded views.
This enum controls where a property is displayed in generated scaffolding views:
Example usage in domain class constraints:
import static grails.gorm.validation.DisplayType.*
class Book {
String title
Date dateCreated
String internalNotes
static constraints = {
dateCreated display: ALL // Override blacklist, show everywhere
internalNotes display: NONE // Never show
}
}
For backwards compatibility, boolean values are also supported:
display: true is equivalent to the default behavior (not setting display)display: false is equivalent to NONE| Enum constant | Description |
|---|---|
ALL |
Display the property in all views (input and output). |
INPUT_ONLY |
Display the property only in input views (create and edit forms). |
NONE |
Never display the property in any view. |
OUTPUT_ONLY |
Display the property only in output views (show and index/list views). |
| Modifiers | Name | Description |
|---|---|---|
static DisplayType |
MAX_VALUE |
|
static DisplayType |
MIN_VALUE |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Display the property in all views (input and output). This also overrides the default blacklist for properties like dateCreated and lastUpdated.
Display the property only in input views (create and edit forms).
Never display the property in any view.
Display the property only in output views (show and index/list views).