...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<client:config id="CONFIGID"> ... <perspective> .. </perspective> <defaults> <entities> <entity id="property" isDefault="true"> <data>data.property.detail</data> <!-- set the default data definition for properties --> <search>search.property.byaddress</search> <!-- set the default search for properties --> </entity> <entity id="roads"> <data>data.road.detail</data> <!-- set the default data <search>search.road.byname</search> definition for roads --> </entity> <report> <format>html</format><search>search.road.byname</search> <!-- set the default search for roads --> <openExternal>true<</openExternal>entity> <openWithScript>true</openWithScript> <timeout>240</timeout> </report> </defaults> </client:config> |
In the above example we've set the property entity as the default, and set the initial search for properties to be search.property.byaddress and the initial data to be data.property.detail. For roads we've set the search to search.road.byname and the data to data.road.detail.
...
<entity id="parks" remove="true"/> <!-- remove parks as being an available entity -->
<entity id="lights" remove="true"/> <!-- remove lights as being an available entity -->
<entities>
<report>
<format>html</format>
<openExternal>true</openExternal>
<openWithScript>true</openWithScript>
<timeout>240</timeout>
</report>
</defaults>
</client:config>
|
In the above example we've set the property entity as the default, and set the initial search for properties to be search.property.byaddress and the initial data to be data.property.detail. For roads we've set the search to search.road.byname and the data to data.road.detail. We've also removed the parks and lights entities from being available to the user. The user will have access to all the other available entities, but they will have the default settings (for default search, data definition, etc).
We've also specified that the default report format will be html, report will open in a new window (or tab) rather than a windows embedded within the weave client itself, and it'll use javascript to open the window, bypassing the intermediate 'click to open' popup window and finally increased the report timeout to 240 seconds (from the default of 120 seconds).
You can specify exactly what entities are available on the client for a user by specifying the name of a user attribute that contains the id's of the entities that should be available.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<client:config id="CONFIGID">
...
<perspective>
..
</perspective>
<defaults>
<entities userattribute="entities"/>
<report>
<format>html</format>
<openExternal>true</openExternal>
<openWithScript>true</openWithScript>
<timeout>240</timeout>
</report>
</defaults>
</client:config> |
In the above example the user attribute named entities
should contains one or more entity id's and the user will have access to only those entities. In this situation you can still specify individual entity settings, for example the default search, within the entities
tag (they just haven't been shown in this example), but you can also specify that information directly within the entity configuration rather than here in the default section.
It's also possible to have the list of entities listed in the entities section refine the available entities directly. By default specifying multiple entity
tags within the entities
tag just modifies the settings for those entities, but by setting filter
to true
for in the entities
tag you can further specify that these entities listed will be the only ones available to the client.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<client:config id="CONFIGID">
...
<perspective>
..
</perspective>
<defaults>
<entities filter="true"> <!-- user will only have access to property, roads and parks -->
<entity id="property" isDefault="true">
<data>data.property.detail</data>
<search>search.property.byaddress</search>
</entity>
<entity id="roads">
<data>data.road.detail</data>
<search>search.road.byname</search>
</entity>
<entity id="parks"/>
<entity id="lights"/>
<entities>
....
</defaults>
</client:config> |
In this example users will only have access to the property, roads, parks and lights entities, with some additional settings being applied to the property and roads.
Icons
You can create custom icons that can then be referred to in the client configuration by creating an icons
directory within the ...\weave\platform\workspace
directory, then any .gif
or .png
files within there will be available to use anywhere an iconCls
attribute can be set. Note that if the icons
directory doesn't exist when the server is started it will need to be restarted before icons are available for use.
...