public enum ListGridFieldType extends java.lang.Enum<ListGridFieldType> implements ValueEnum
Enum Constant and Description |
---|
BINARY
For viewing, the grid renders a 'view' icon (looking glass) followed by a 'download' icon and then the name of the file
is displayed in text.
|
BOOLEAN
For viewing and editing a checkbox is shown with a check mark for the
true value and no check mark for the
false value. |
DATE
Field value should be a
Date instance representing a logical date, with no time of day information. |
DATETIME
Field value should be a
Date instance representing a specific date and time value. |
FLOAT
Same as
text . |
ICON
Shows
field.icon in every cell, and also in the header. |
IMAGE
Renders a different image in each row based on the value of the field.
|
IMAGEFILE
Same as
binary |
INTEGER
Same as
text . |
LINK
Renders a clickable html link (using an HTML anchor tag: <A>).
|
SEQUENCE
Same as
text |
SUMMARY
Show a calculated summary based on other field values within the current record.
|
TEXT
Simple text rendering for view.
|
TIME
Field value should be a
Date instance representing a logical time, meaning time value that does not have a
specific day and also has no timezone. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
static ListGridFieldType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ListGridFieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ListGridFieldType TEXT
length
attribute) is larger than the value specified by
longTextEditorThreshold
, a text input icon
is shown that, when clicked on (or field is focused in) opens a larger editor that expands outside the boundaries of the
cell (textarea by default, but overrideable via longTextEditorType
).public static final ListGridFieldType BOOLEAN
true
value and no check mark for the
false
value. This behavior may be suppressed by setting link{listGridField.suppressValueIcon} for the
field. See booleanTrueImage
for customization.public static final ListGridFieldType INTEGER
public static final ListGridFieldType FLOAT
public static final ListGridFieldType DATE
Date
instance representing a logical date, with no time of day information. See
DateFormatAndStorage
for details of the logical date type and how it is represented and
manipulated. Dates will be formatted using ListGridField.dateFormatter
if specified, otherwise ListGrid.dateFormatter
. If both these attributes are unset, dates are formatted using the standard short display format
for dates.
For editing, by default a
DateItem
is used with useTextField
set to true, providing textual date entry
plus a pop-up date picker. The dateFormatter
and inputFormat
for the editor will be picked up
from the ListGridField, if specified.
public static final ListGridFieldType TIME
Date
instance representing a logical time, meaning time value that does not have a
specific day and also has no timezone. See DateFormatAndStorage
for details of the
logical time type and how it is represented and manipulated. Times will be formatted using ListGridField.timeFormatter
if specified, otherwise
ListGrid.timeFormatter
.
If both these attributes are unset, times are formatted using the standard String for times.
For editing, by default a TimeItem
is used. The timeFormatter
for the editor will be picked up from
the ListGridField, if specified.
public static final ListGridFieldType DATETIME
Date
instance representing a specific date and time value. See DateFormatAndStorage
for details of the datetime type and how it is represented and
manipulated. Dates will be formatted using ListGridField.dateFormatter
if specified, otherwise ListGrid.datetimeFormatter
. If both these attributes are
unset, dates are formatted using the standard short display format
for datetime values.
For editing, by default a DateTimeItem
is used, providing textual date entry plus a pop-up date picker.
The dateFormatter
and inputFormat
for the editor will be picked up from the
ListGridField, if specified.
public static final ListGridFieldType SEQUENCE
text
public static final ListGridFieldType LINK
linkText
or linkText
. Clicking the link opens the URL in a new
window by default. To change this behavior, you can set field.target
, which works identically to the
"target" attribute on an HTML anchor (<A>) tag. See target
for more information.
In inline edit mode, this type works like a text field.
To create a link not covered by this feature, consider using ListGridField.formatCellValue
along with Canvas.linkHTML
, or simply styling the field
to look like a link, and providing
interactivity via field.recordClick()
.
public static final ListGridFieldType IMAGE
imageURLPrefix
if specified. The
size of the image is controlled by imageSize
, imageWidth
, imageHeight
(and by the similarly-named global default
attributes on the ListGrid itself). You can also specify the following attributes on the field:
activeAreaHTML
, and extraStuff
- these are passed to Canvas.imgHTML
to generate the final URL.
Note if you want to display
icons in addition to the normal cell value, you can use valueIcons
instead.
public static final ListGridFieldType ICON
field.icon
in every cell, and also in the header.
Useful for a field that is used as a button, for example, launches a detail window or removes a row. Implement a field.recordClick
to define a behavior for the
button. NOTE: for a field that shows different icons depending on the field value, see valueIcons
.
type:"icon"
also defaults to
a small field width, accommodating just the icon with padding, and to a blank header title, so that the header shows the
icon only.
field.iconWidth
and related
properties configure the size of the icon both in the header and in body cells.
If you want the icon to appear only
in body cells and not in the header, set field.cellIcon
instead, leaving field.icon null.
public static final ListGridFieldType BINARY
DataSource.viewFile
. For images and
other file types with known handlers, the content is typically displayed inline - otherwise the browser will ask the
user how to handle the content. If the download icon is clicked, DataSource.downloadFile
is used to cause the browser to show a "save" dialog. There is no inline editing mode for this
field type.public static final ListGridFieldType IMAGEFILE
binary
public static final ListGridFieldType SUMMARY
recordSummaryFunction
for more informationpublic static ListGridFieldType[] values()
for (ListGridFieldType c : ListGridFieldType.values()) System.out.println(c);
public static ListGridFieldType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null