Versions Compared

Key

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

The Entity Selector panel provides a view that shows all of the current entities and allows the user to select the active entity. It support supports grouping of the entities and tools to clear the selection for the entity and zoom to the selection.

This view can be referenced using the id 'com.cohga.html.client.main.entitySelectorView', for historical reasons, or 'weave.entitySelectorView'.

A usable implementation of this view was only made available at Weave 2.4.11.

Code Block
xml
xml
titleBasic panel definition
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
</view>

...

Code Block
xml
xml
titlePanel with right click context menu
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
	<contextmenu>
		<item action="weave.toc.zoomSelection" text="Zoom to Selection"/>
		<item action="weave.toc.clearSelection" text="Clear Selection"/>
	</contextmenu>
</view>

...

Code Block
xml
xml
titlePanel with right click context menu and toolbar
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
	<toolbar>
		<item action="com.cohga.html.client.map.select.clearAction"/>
		<item action="com.cohga.html.client.map.select.clearAllAction"/>
		<item action="com.cohga.html.client.map.select.zoomAction"/>
	</toolbar>
	<contextmenu>
		<item action="weave.toc.zoomSelection" text="Zoom to Selection"/>
		<item action="weave.toc.clearSelection" text="Clear Selection"/>
	</contextmenu>
</view>

...

Code Block
xml
xml
titlePanel with refined set of entities
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
	<entity>property</entity>
	<entity>owners</entity>
	<entity>roads</entity>
</view>

...

Note

The ordering of the entities in the list is also determined by the entity list.


Code Block
xmlxmltitlePanel with refined set of entities, using a different formatting, and custom icons
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
	<entities>
		<entity id="property" iconCls="icon-house"/>
		<entity id="owners" iconCls="icon-group"/>
		<entity id="roads" iconCls="icon-lorry"/>
	</entities>
</view>

Note

Both forms of entity lists are supported, that is <entity> tags directly listed or embedded within an <entities> tag, this allows for the group of entities to be referenced as a whole using a snippet and included using <entities id="entitylist"/>.
Additionally both entity formats are supported, that is <entity>id</entity> and <entity attribute="value"/>, the first format is the equivalent of <entity id="id"/>, but the second format allows you to specify additional attributes.


Code Block
xml
languagexml
titlePanel with entities customised by defaults sectionDefaults section modified to alter appearance of entities
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
</view>

<defaults>
	<entities>
		<entity id="property" iconCls="icon-house"/>
		<entity id="owners" iconCls="icon-group"/>
		<entity id="roads" iconCls="icon-lorry"/>
	</entities>
<defaults>


Note

Icons listed in the defaults section will be used by other controls also, including the entity selector combo box and the spatial drill-down tool.


Code Block
xml
languagexml
titlePanel with Defaults section entities customised and grouped by defaults section
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
</view>

<defaults>
	<entities>
		<entity id="property" iconCls="icon-house" group="Main"/>
		<entity id="owners" iconCls="icon-group" group="Main"/>
		<entity id="roads" iconCls="icon-lorry" group="Main"/>
	</entities>
<defaults>

...

Note

The title of the group for ungroupd items "Other" by default, but can be changed by setting the 'defaultGroupName' property for the entity selector view, and this value can be set via a resource.


Code Block
xml
languagexml
titlePanel with entities customised and grouped by defaults sectionChanging group name for ungrouped entities
linenumberstrue

<view id="weave.entitySelectorView">
	<location>east</location>
	<defaultGroupName>%ungrouped.entity.label<<defaultGroupName>Ungrouped</defaultGroupName>
</view>

<defaults>
	<entities>
		<entity id="property" iconCls="icon-house" group="Main"/>
		<entity id="owners" iconCls="icon-group" group="Main"/>
		<entity id="roads" iconCls="icon-lorry" group="Main"/>
	</entities>
<defaults>

Image Removed

Note
Custom icons can be created as described here


Image Added

Note

Custom icons can be created as described here


Code Block
languagexml
titlePanel with all groups collapsed on start up (apart from Active Layer)
linenumberstrue
<view id="weave.entitySelectorView">
	<location>east</location>
	<startCollapsed>true</startCollapsed>
</view>