Administering the client at a basic level is all done through the configuration xml file. The configuration allows multiple clients with different components depending on the user base of the client.
Contexts
Weave 2.6.8 adds contexts to the Weave configuration. A context is a way to group entities, and other configuration items, so that a Weave client can be restricted to using just a subset of all the available entities.
Layouts
The client is made up of three main parts, the toolbar, statusbar and the main content area. The toolbar is located at the top and the statusbar at the bottom. The administrator is free to move actions and components around the interface in order to customise the environment. The main content area is known as a perspective area, views can be added to a border layout within this area.
...
In the above example there are two clients defined and each has a different id. When using the client open a browser and point to
http://server:port/weave/main.html
or
http://server:port/weave/police.html
Additionally, if there is more than one client configuration and the user viewshttp://server:port/weave
they will be presented with a list of the available client configurations.
...
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
...
Entity selections
By default entity selections are preserved between client restarts, by setting the flag retainSelections to false for the client config the selections will be cleared when the client starts
Code Block | ||
---|---|---|
| ||
<client:config id="editing" retainSelections="false">
<!-- you could also set it like this -->
<retainSelections>false</retainSelections>
<!-- The rest of the client config goes here -->
</client:config> |
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.
...
To see what current icons are available for use, open the HTML page /weave/styles/core.css
on the Weave instance
e.g. http://localhost:8080/weave/styles/core.css
and any line starting with .icon-
will be an icon available for use.
...
Here is a bundle that contains a set of replacement buttons, com.cohga.client.weave.themes.collapse_1.0.0.jar, that you can use to alter the appearance.
...
To use the updated buttons you need to download the com.cohga.client.weave.themes.collapse_1.0.0.jar file and copy it to the ...\weave\platform\plugins\
directory.
...
By providing a redirect URL as part of the configuration you can change the simple Close button into a choice between Yes and No and make this a replacement for the licence panel (as shown below). shown below).
Code Block | ||
---|---|---|
| ||
<plugin id="weave.splash">
<html>Splash content here</html>
<redirectUrl>https://www.cohga.com/</redirectUrl>
</plugin> |
...
If the user clicks Yes, the panel will close. If they click No, they will be redirected to where ever you set the redirect URL.
In addition, you can also provide the user with an option not to not display the splash screen again, with an optional button that can be . This can be used in combination with a button added to a toolbar/statusbar to allow the user to open the panel again if they want (as shown below).shown below).
Code Block | ||
---|---|---|
| ||
<plugin id="weave.splash">
<html>Splash content here</html>
<redirectUrl>https://www.cohga.com/</redirectUrl>
<allowHide>true</allowHide>
</plugin>
<toolbar>
<item action="weave.showsplash"/>
</toolbar> |
...
Finally, you have the option to configure the splash panel to display only once. So once it’s closed the first time it won’t display on startup again unless you provide access to the button to re-show the splash panel (see toolbar item above) or update the config to give the panel a different id.
Code Block | ||
---|---|---|
| ||
<plugin id="weave.splash"> <html>Splash content here</html> <redirectUrl>https://www.cohga.com/</redirectUrl> <showOnce>true</showOnce> </plugin> |
Configuration for the splash panel is provided by a plugin, and the various configuration options for the panel are configured within the plugin. Some configuration examples are shown below.
...
Code Block | ||
---|---|---|
| ||
<plugin id="weave.splash" height="400" width="600" url="https> <height>400</height> <width>600</width> <url>https://cohga.com/weave/licence.html" redirectUrl="httpshtml</url> <redirectUrl>https://cohga.com/weave/"<redirectUrl> </>plugin> |
Show a basic splash page with embedded HTML that allows the user to stop it displaying at the start of each session.
...
If you have a different splashId
specified in the plugin configuration you have to also provide that, and if .
Code Block | ||
---|---|---|
| ||
<item action="weave.showsplash" splashId="splash20211119"/> |
If you want to specify a different tab on a multi-tab splash panel you can also do that, for example to show the Help tab in the above configuration when the button is pressed you can use the following (the tab number starts from 0).
Code Block | ||
---|---|---|
| ||
<item action="weave.showsplash" splashId="splash20211119" tab="1"/> |
Further Reading
...