Note |
---|
As of Weave 2.5.18 you can specify client formatting options for a data definition directly in the <data:data> tag for each data definition, this is outlines at the end of this page. |
Below I'm going to outline exactly how to format columns in a data grid.
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Initial client config defaults section |
---|
|
<defaults>
<entity id="lyr_suburbs />
<entity id="lyr_properties" isDefault="true">
<search>aq_property_by_address_auth</search>
<data>ar_property_address_auth</data>
</entity>
<entity id="lyr_parcels"/>
</defaults>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Data configuration ready to have it formatting changed |
---|
|
<data:datadefinition id="__dd__ar_properties_sde">
<datasourcedataconnection datasource="ds_sde" table="PROPERTIES_ACTIVE_REGION" key="PROPERTY_NUMBER" prefix="DISTINCT">
<parameter type="string" name="sp_propno" label="Parcel Number" column="PROPERTY_NUMBER" />
<parameter type="string" name="sp_houseno" label="House Number" column="HOUSE_NUMBER" />
<parameter type="string" name="sp_roadname" label="Road Name" column="STREET_NAME" />
<parameter type="string" name="sp_pubprop" label="Public/State Property" column="PUBLIC_PROPERTIES" />
<parameter type="list" name="lp_landclass" label="Council Land Classification" column="PUBLIC_LAND_IDENTIFIER" list="vl_props_active"/>
<parameter type="string" name="sp_propdesc" label="Property Description" column="PROPERTY_NAME" />
</datasourcedataconnection>
</data:datadefinition>
<data:data id="ar_properties_sde" label="GIS - Property Details" entity="lyr_properties" datadefinition="__dd__ar_properties_sde" />
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Defaults section with empty data configuration section |
---|
|
<defaults>
<entity id="lyr_suburbs />
<entity id="lyr_properties" isDefault="true">
<search>aq_property_by_address_auth</search>
<data>ar_property_address_auth</data>
</entity>
<entity id="lyr_parcels"/>
<data>
<!-- This is the new data section that I was referring to above, at the moment it doesn't do anything, I'm just showing where it goes, note that I've added it just inside of the defaults tag, and not within an entity tag -->
</data>
</defaults>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Defaults section with empty data configuration section for a single grid |
---|
|
<defaults>
<entity id="lyr_suburbs />
<entity id="lyr_properties" isDefault="true">
<search>aq_property_by_address_auth</search>
<data>ar_property_address_auth</data>
</entity>
<entity id="lyr_parcels"/>
<data>
<data id="ar_properties_sde">
<!-- This is the new sub-data section that I was just referring to, it still doesn't do anything, I'm just showing where it goes, what we add inside of this will alter the ar_properties_sde data display -->
</data>
</data>
</defaults>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Defaults section with a data configuration section to change to columns |
---|
|
<defaults>
<entity id="lyr_suburbs />
<entity id="lyr_properties" isDefault="true">
<search>aq_property_by_address_auth</search>
<data>ar_property_address_auth</data>
</entity>
<entity id="lyr_parcels"/>
<data>
<data id="ar_properties_sde">
<column id="sp_houseno" width="20" align="right"/>
<column id="sp_propdesc" width="200"/>
</data>
</data>
</defaults>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Defaults section with multiple data configuration section to alter multiple grid |
---|
|
<defaults>
<entity id="lyr_suburbs />
<entity id="lyr_properties" isDefault="true">
<search>aq_property_by_address_auth</search>
<data>ar_property_address_auth</data>
</entity>
<entity id="lyr_parcels"/>
<data>
<data id="ar_properties_sde">
<column id="sp_houseno" width="20" align="right"/>
<column id="sp_propdesc" width="200"/>
</data>
<data id="ar_conquest_council_building_details">
<!-- you would add some column tags here like the one above, I haven't done this so this won't actually do anything, but you get idea -->
</data>
</data>
</defaults>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Defaults section with multiple data configuration section to alter multiple grid and globally altering some columns |
---|
|
<defaults>
<entity id="lyr_suburbs />
<entity id="lyr_properties" isDefault="true">
<search>aq_property_by_address_auth</search>
<data>ar_property_address_auth</data>
</entity>
<entity id="lyr_parcels"/>
<data>
<data id="ar_properties_sde">
<column id="sp_houseno" width="20" align="right"/>
<column id="sp_propdesc" width="200"/>
</data>
<data id="ar_conquest_council_building_details">
<!-- you would add some column tags here like the one above, I haven't done this so this won't actually do anything, but you get idea -->
</data>
<!-- this is where I'm changing the grid display for some parameter globally, every data definition that's displayed to the user with a parameter with these names will be formatted according to what we do here -->
<column id="strnum" width="50" align="right"/>
<column id="strname" width="100"/>
</data>
</defaults>
|
Now once that's done, you should see the change in the column display for those columns we've changed.
Formatting in 2.5.18+
As of Weave 2.5.18 you can specify the same sort of formatting information described above directly within theĀ <data:data>
tag that's associated with a data definition, e.g.
Code Block |
---|
language | xml |
---|
title | Formatting a data definition |
---|
|
<data:datadefinition id="properties_details">
<datasourcedataconnection datasource="ds_sde" table="PROPERTIES_ACTIVE_REGION" key="PROPERTY_NUMBER" prefix="DISTINCT">
<parameter type="string" name="sp_propno" label="Parcel Number" column="PROPERTY_NUMBER" />
<parameter type="string" name="sp_houseno" label="House Number" column="HOUSE_NUMBER" />
<parameter type="string" name="sp_roadname" label="Road Name" column="STREET_NAME" />
<parameter type="string" name="sp_pubprop" label="Public/State Property" column="PUBLIC_PROPERTIES" />
<parameter type="list" name="lp_landclass" label="Council Land Classification" column="PUBLIC_LAND_IDENTIFIER" list="vl_props_active"/>
<parameter type="string" name="sp_propdesc" label="Property Description" column="PROPERTY_NAME" />
</datasourcedataconnection>
</data:datadefinition>
<data:data id="ar_property_details" label="Property Details" entity="lyr_properties" datadefinition="properties_details">
<columns>
<column id="sp_propno" align="right" width="40"/>
<column id="sp_houseno" align="right" width="40"/>
<column id="sp_roadname" width="100"/>
</columns>
</data:data> |