...
name | type | cardinality | default | description |
---|---|---|---|---|
label | String | 0..1 |
| Label to display in tab |
location | String | 1..1 |
| Which region to add the view to |
toolbar | grid actions | 0..n |
| A collection of tools to add to the panel |
format | format definitions | 0..1 |
| A collection of formatting options |
emptyMsg | string | 0..1 | "No data to display" | Text to display for no results |
displayMsg | string | 0..1 | "Displaying {0} - {1} of {2}" | Paging toolbar text showing which rows are being displayed and how many rows are available in total. If set then this text will be displayed at the end of the grid status bar. Requires at least version 2.16.x of com.cohga.client.weave.main |
beforePageText | string | 0..1 | "Page" | Label before page number |
afterPageText | string | 0..1 | "of {0}" | Text after page number |
firstText | string | 0..1 | "First Page" | Tooltip for first page button |
prevText | string | 0..1 | "Previous Page" | Tooltip for previous page button |
nextText | string | 0..1 | "Next Page" | Tooptip for next page button |
lastText | string | 0..1 | "Last Page" | Tooltip for last page button |
refreshText | string | 0..1 | "Refresh" | Tooltip for refresh button |
itemsText | string | 0..1 | "Items per page" | Text for items per page |
pageSize | integer | 0..1 | 20 | The number of results to display per page |
showPageSize | boolean | 0..1 | true | Should the page size selector be shown. Requires at least version 2.16.x of com.cohga.client.weave.main |
Example
Basic grid view
...
<view id='com.cohga.html.client.main.gridView'>
<label>Identify</label>
<location>south</location>
</view>
...
Note |
---|
The following properties This bundle version also added support for the above properties in all of the data grid views, but unless they need to be customised per-window it's recommended that the global resource values be used instead since they change all the views at once. |
Examples
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<view id="'com.cohga.html.client.main.gridView"'> <label>Data<<label>Identify</label> <location>center.south<<location>south</location> </view> |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<view id="com.cohga.html.client.main.gridView"> <toolbar> <label>Data</label> <location>center.south</location> <!-- toolbar items go here -- <toolbar> <!-- toolbar items go here --> </toolbar> <!-- override column widths --> <format> <!-- set column widths for columns in a specific data --> <data id="ar_property_details"> <column id="PropNo" width="20"/> <column id="OwnerName" width="200"/> </data> <data id="ar_road_details"> <column id="Status" width="10"/> <column id="Old_Status" hidden="true"/> </data> <!-- set column width globally for columns in any data --> <column id="RoadName" width="200"/> <column id="RoadType" width="50"/> <column id="Suburb" width="250"/> <column id="oid" hidden="true"/> </format> </view> |
Code Block | ||||||
---|---|---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
<client:format id="custom"> <!-- set column widths for columns in a specific data --> <data id="ar_property_details"> <column id="PropNo" width="20"/> <column id="OwnerName" width="200"/> </data> <data id="ar_road_details"> <column id="Status" width="10"/> </data> <!-- set column width globally for columns in any data --> <column id="RoadName" width="200"/> <column id="RoadType" width="50"/> <column id="Suburb" width="250"/> </client:format> <client:config id="test"> <!-- there should be other config items here --> <view id="com.cohga.html.client.main.gridView"> <label>Data</label> <location>center.south</location> <toolbar> <!-- toolbar items go here --> </toolbar> <!-- override formatting --> <format ref="custom"/> </view> </client:config> |
...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
<client:config id="example"> <!-- there should be other config items here --> <view id="com.cohga.html.client.main.gridView"> <label>Data</label> <location>center.south</location> <emptyText>%nodata<emptyMsg>%nodata.text</emptyText>emptyMsg> </view> <!-- there should be other config items here --> <client:config> <client:resources> <resource id="nodata.text">No data to display</resource> </client:resources> <client:resources lang="ru"> <resource id="nodata.text">Нет данных для отображения</resource> </client:resources> <client:resources lang="sv"> <resource id="nodata.text">Inga data för att visa</resource> </client:resources> <client:resources lang="it"> <resource id="nodata.text">Nessun dato da visualizzare</resource> </client:resources> |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<client:config id="example">
<!-- there should be other config items here -->
<view id="com.cohga.html.client.main.gridView">
<label>Data</label>
<location>center.south</location>
<!-- note, no text properties specified here -->
</view>
<!-- there should be other config items here -->
<client:config>
<client:resources>
<resource id="grid.data.emptyMsg">No data to display</resource>
</client:resources>
<client:resources lang="ru">
<resource id="grid.data.emptyMsg">Нет данных для отображения</resource>
</client:resources>
<client:resources lang="sv">
<resource id="grid.data.emptyMsg">Inga data för att visa</resource>
</client:resources>
<client:resources lang="it">
<resource id="grid.data.emptyMsg">Nessun dato da visualizzare</resource>
</client:resources>
|
I18n resources
id | default |
---|---|
grid.data.emptyMsg | No data to display |
grid.page.displayMsg | Displaying {0} - {1} of {2} |
grid.page.beforePage | Page |
grid.page.afterPage | of {0} |
grid.page.first | First Page |
grid.page.prev | Previous Page |
grid.page.next | Next Page |
grid.page.last | Last Page |
grid.page.refresh | Refresh |
grid.page.items | Items per page |
Date and Time formatting
You can also change the default date, time and date/time format by setting adding dateformat, timeformat and/or datetimeformat entries to the <data> section of the <defaults> section in the client config.
...