Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
titleFormatting with snippet (for re-use of formatting)
linenumberstrue
<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 would be other config items here -->
        <perspective>
                <!-- there would 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>
        </perspective>
</client:config>

Setting formatting in defaults section

Code Block
xml
xml
titleAlternate default formatting of grid and align option as of version 2.4.14
linenumberstrue
<client:config id="test">
        <!-- there would be other config items here -->
        <perspective>
                <!-- there would 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>
                </view>
        </perspective>
        <defaults>
                <data>
                        <!-- set column widths for columns in a specific data -->
                        <data id="ar_property_details">
                                <column id="PropNo" width="20" align="right"/>
                                <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"/>
                </data>
        </defaults>
</client:config>

...