<xvw:columnAttribute dataField='name' .... label='Nome' >
</xvw:columnAttribute>
Property![]() |
Description | Type | Possible Values | Usage | Default Value | Example |
---|---|---|---|---|---|---|
renderer | An implementation of the netgest.bo.xwc.components.classic.GridColumnRenderer interface which allows the column attribute to rendered in a custom way | EL ->GridColumnRenderer | Optional | Must be binded to a bean renderer = '#{viewBean.myRenderer}' | ||
sqlExpression | Sql query to execute to retrieve the values of this column | String | Optional | |||
contentHtml | Marks the content of the column as HTML, this is used when exporting the column values to another format (excel, pdf) and it marks that the content is HTML (or not) and will be converted to final format knowing this. | Boolean | True / False | Optional | False | |
dataField | Name of the column of the DataListConnector / boObjectList, can also be used as alias to SQL columns | String | The name of an SQL from the sqlExpression property or the name of a file from the DataListConnector | Required | ||
groupable | If the results can be grouped by this column | Boolean | True / False | Optional | True | |
hidden | If the column is hidden or not by default | Boolean | True / False | Optional | False | |
hideable | If this column can be hidden (by the user) | Boolean | True / False | Optional | True | |
label | The label to show in the table header column | String / EL | Optional | |||
lookupViewer | Force the lookup viewer name when searching by this column. | String | The name of a Lookupviewer | Optional | ||
renderTemplate | Render template, or JSON object with several render templates according to the value for this column. | String | Optional | |||
resizable | If the column size (width) can be changed by the user | Boolean | True / False | Optional | True | |
searchable | If the results of the grid panel can be searched by this column | Boolean | True / False | Optional | True | |
sortable | If the rows can be sorted by this column | Boolean | True / False | Optional | True | |
width | The width of this column (in pixels) | Int | Any positive integer | Optional* | width='100' * If you intend to use the export to PDF / Excel feature you need to set a valid (> 0) with for each column |
|
wrapText | Whether or not to wrap the text of column (usefull for columns of type LongText) | Boolean | True / False | Optional | False |
<xvw:gridPanel enableGroupBy='true' dataSource='#{viewBean.dataList}'> <xvw:columns> <xvw:columnAttribute width='100' dataField='BOUI'/>
<xvw:columnAttribute dataField='myFields' renderer='#{viewBean.myRenderer}'/>Java Bean Code
public GridColumnRenderer getMyRenderer() { return new GridColumnRenderer() { public String render( GridPanel grid, DataRecordConnector record, DataFieldConnector field ) { String oValue = field.getValue(); return "<i>" + oValue + "</i>"; } } }Notes: A DataRecordConnector represents the line form the current Grid and the DataFieldConnector represents the field from the current line.
<xvw:columnAttribute width='150' label='Criador' dataField='CRIADOR' renderTemplate="<div style=\'color:red;font-weight:bold\'>%s</div>" sqlExpression="(select username from OiXEOUser where OTeste.CREATOR$=BOUI)" />
<xvw:gridPanel enableGroupBy='true' dataSource='#{viewBean.dataList}'> <xvw:columns> <xvw:columnAttribute width='150' label='Criador' dataField='CRIADOR' renderTemplate=" { 'SYSUSER': '<div style=\'color:red;font-weight:bold\'>%s</div>', '':'Null', 'default': 'Other' } " sqlExpression="(select username from OiXEOUser where OTeste.CREATOR$=BOUI)" />Predefined Constants to use in the dataField property _(can only be used when the the DataListConnector of the GridPanel component is an instance of XEOObjectListConnector - meaning that the Panel must be showing)_
Constant | Description |
---|---|
SYS_OBJECT_ICON_16 | Renders the Icon of the Object |
SYS_OBJECT_LABEL |
The label of the type of object (XEOModel) |
SYS_ICON_COMPOSED_STATE | TODO |
SYS_CARDID | The Card Id of the object |
SYS_ROWNUM | The number of the row |
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
![]() |
columnAttribute.PNG | manage | 0.8 K | 2011-02-09 - 12:28 | NicolauGrosskopf | |
![]() |
columnAttributeItalico.PNG | manage | 1.3 K | 2011-02-09 - 13:42 | NicolauGrosskopf |