Skip to content

@View

Configures how a field is displayed as a column in the list table, including the column title, width, display type, sorting, and more.

Attributes

AttributeDescription
titleColumn header title
descColumn description
typeData display type, defaults to AUTO, see the type table below
showWhether to display the column, defaults to true
sortableWhether clicking the column header sorts the table, defaults to false
exportWhether to include in Excel exports, defaults to true
widthColumn width with unit, e.g. 200px, 20%
columnWhen the field is an object type, specifies the property name to display (commonly used with @ManyToOne)
classNameCSS class name applied to the column
tplOpens a custom template in a popup; the row variable is available inside the template to access current row data
ifRenderDynamically controls whether the column is rendered (ExprBool)
templateColumn value formatting template (a JS expression evaluated by eval on the frontend); available variables: value (current cell value), item (full row data), item.xxx (specific column value)

Display Types (ViewType)

TypeDescription
AUTOAutomatically inferred from the @Edit type or field type
TEXTPlain text
SAFE_TEXTText containing scripts or tags is not rendered, preventing XSS (1.12.11+)
IMAGEImage
IMAGE_BASE64Base64-encoded image
SWFFlash animation
HTMLRenders an HTML fragment
MOBILE_HTMLRenders HTML at mobile screen dimensions
QR_CODEQR code
LINKOpens a link in a new window
LINK_DIALOGOpens a link in a dialog
DOWNLOADDirect download
ATTACHMENTOpens an attachment in a new window
ATTACHMENT_DIALOGOpens an attachment in a dialog
DATEDate formatted display
DATE_TIMEDate-time formatted display
BOOLEANBoolean value display
NUMBERNumeric display
MAPMap display
CODESyntax-highlighted code display
MARKDOWNRendered Markdown display
TAB_VIEWOne-to-many / many-to-many sub-table display

Contributors

The avatar of contributor named as YuePeng YuePeng

Changelog

Released under the Apache-2.0 License.