...
com.cohga.html.client.main.gridView
Sub-tags
Name name | type | cardinality | 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..1 | A collection of tools to add to the panel |
format | format definitions | 0..1 | A collection of formatting options |
Example
Basic grid view
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<view id='com.cohga.html.client.main.gridView'> <label>Identify</label> <location>south</location> </view> |
Formatting a grid view
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<view id="com.cohga.html.client.main.gridView"> <label>Data</label> <location>center.south</location> <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"/> <width>20</width> </data> </column><data id="ar_road_details"> <column id="Status" width="StreetType10"/> </data> <!-- set column width <width>50</width>globally for columns in any data --> <column </column>id="RoadName" width="200"/> <column </data>id="RoadType" width="50"/> <data<column id="ar_road_details""Suburb" width="250"/> </format> </view> |
Formatting with snippet (for re-use of formatting)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<client:format id="custom"> <!-- set column widths for <column id="RoadName"> columns in a specific data --> <data id="ar_property_details"> <column <width>200</width>id="PropNo" width="20"/> <column id="OwnerName" width="200"/> </column>data> <data id="ar_road_details"> <column id="Status" width="RoadType10"/> </data> <!-- set column width globally for columns in any data --> <width>50</width> <column id="RoadName" width="200"/> <column id="RoadType" width="50"/> <column id="Suburb" width="250"/> </column>client:format> <client:config id="test"> <!-- there should be other </data> config items here --> <view id="com.cohga.html.client.main.gridView"> <!-- set column width globally for the column in any data --> <label>Data</label> <column id="StreetName"> <location>center.south</location> <toolbar> <width>200</width> </column> !-- toolbar items go here --> <column id="Suburb"> </toolbar> <!-- override formatting --> <width>250</width> <format </column>ref="custom"/> </format>view> </view>client:config> |