Versions Compared

Key

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

...

A border layout defines 5 regions that act as containers on the screen for views. The five areas are North (top), South (bottom), West (left), East (right) and Center (middle). Center is the only container that will dynamically resize all borders to fit within the area, all other regions only resize in one direction. For example, East and West Regions will resize their height depending on the size of the Appplication Application Window. North and South regions have fixed heights and will only resize their width depending on the size of the Appplication Application Window. This does not mean that the user does not have the ability to resize the views if allowed by the administrator, just that the initial size of the non-center panels is pre-determined.

...

Code Block
xml
xml
linenumberstrue

...
<client:config id="main">
  ...
</client:config>

<client:config id="police">
  ...
</client:config>
...

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 views
http://server:port/weave
they will be presented with a list of the available client configurations.

...

Code Block
xml
xml
linenumberstrue

...
<client:config id="police">
  <acl id="acl.police">
  ...
</client:config>
...

...

Code Block
xml
xml
linenumberstrue

<acl:acl id="acl.police">
  <entry type="allow">ROLE_POLICE</entry>
  <entry type="deny">*</deny>
</acl:acl>

...

Code Block
xml
xml
linenumberstrue

...
<client:config id="main">
  ...
  <toolbar>
    ...
    <item action="au.gov.police.ShowSpeedCameras">
      <acl id="acl.police"/>
    </item>
    ...
  </toolbar>
  ...
</client:config>
...

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  <title>TITLE</title>
  <perspective>
    <label>LABEL</label>
  </perspective>
</client:config>

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  <title>TITLE</title>
  <perspective>
    <label>LABEL</label>
    <view id="VIEWID">
      VIEWCONTENT
    </view>
  </perspective>
</client:config>

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  <title>TITLE</title>
  <perspective>
    <label>LABEL</label>
    <view id="VIEWID1">
      VIEW1CONTENT
    </view>
    <view id="VIEWID2">
      VIEW2CONTENT
    </view>
  </perspective>
</client:config>

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  <title>TITLE</title>
  <perspective>
    <label>LABEL</label>
    <layout>
      <west width="WIDTH">
      <center>
    </layout>
    <view id="VIEWID1" location="west">
      VIEW1CONTENT
    </view>
    <view id="VIEWID2">
      VIEW2CONTENT
    </view>
  </perspective>
</client:config>

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  <title>TITLE</title>
  <toolbar>
    TOOLBARCONTENT
  </toolbar>
  <statusbar>
    STATUSBARCONTENT
  </statusbar>
  <perspective>
    <label>LABEL</label>
    <layout>
      <west width="WIDTH">
      <center>
    </layout>
    <view id="VIEWID1" location="west">
      VIEW1CONTENT
    </view>
    <view id="VIEWID2">
      VIEW2CONTENT
    </view>
  </perspective>
</client:config>

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  <title>TITLE</title>
  <toolbar>
    TOOLBARCONTENT
  </toolbar>
  <statusbar>
    STATUSBARCONTENT
  </statusbar>
  <perspective>
    <label>LABEL</label>
    <layout>
      <west width="WIDTH">
      <center>
    </layout>
    <view id="VIEWID1" location="west">
      VIEW1CONTENT
    </view>
    <view id="VIEWID2">
      VIEW2CONTENT
    </view>
  </perspective>
  <defaults>
    DEFAULTCONTENT
  </defaults>
</client:config>

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  <title>TITLE</title>
  <description>DESCRIPTION</description>
  <debug>true</debug>
  <theme>THEMENAME</theme>
  <toolbar>
    TOOLBARCONTENT
  </toolbar>
  <statusbar>
    STATUSBARCONTENT
  </statusbar>
  <perspective>
    <label>LABEL</label>
    <layout>
      <west width="WIDTH">
      <center>
    </layout>
    <view id="VIEWID1" location="west">
      VIEW1CONTENT
    </view>
    <view id="VIEWID2">
      VIEW2CONTENT
    </view>
  </perspective>
  <defaults>
    DEFAULTCONTENT
  </defaults>
</client:config>

...

Code Block
xml
xml
linenumberstrue

<client:config id="CONFIGID">
  ...
  <perspective>
    ..
  </perspective>
  <defaults>
    <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>
    <report>
      <format>html</format>
      <openExternal>true</openExternal>
      <openWithScript>true</openWithScript>
      <timeout>240</timeout>
    </report>
  </defaults>
</client:config>

...

Pretty much any component can have its icon set by setting the 'iconCls' property to one of these icons, e.g. to use '.icon-edit' in a toolbar:

Code Block
xml
xml

<item action="weave.toggleToolbar" text="Edit" iconCls="icon-edit">
  ...
</item>

...

As of version 2.22.9 of the com.cohga.client.weave bundle it's possible to specify an alias for a client configuration.

Code Block

<client:config id="client">
  <alias id="alias"/>

  <!-- Other config items here -->
<client:config>

...

Additionally you can override some of the configuration in the client config, for example,

Code Block

<client:config id="external">
  <alias id="internal">
    <title>Internal Client</title>
    <description>Client for access by internal users</description>
    <license xsi:nil="true"/>
  </alias>

  <title>External Client</title>
  <description>Client for access by external users</description>
  <license>
    <title>License</title>
    <text>By clicking OK you agree ....</text>
  </license>

  <!-- Other config items here -->
<client:config>

would be the equivalent of

Code Block

<client:config id="external">
  <title>External Client</title>
  <description>Client for access by external users</description>
  <license>
    <title>License</title>
    <text>By clicking OK you agree ....</text>
  </license>

  <!-- Other config items here -->
<client:config>

<client:config id="internal">
  <title>Internal Client</title>
  <description>Client for access by internal users</description>

  <!-- Other config items here -->
<client:config>

...

Which means thow following:

Code Block

<client:config id="external">
  <alias id="internal">
    <title>Internal Client</title>
    <description>Client for access by internal users</description>
    <license xsi:nil="true"/>
    <acl id="internal"/>
  </alias>

  <title>External Client</title>
  <description>Client for access by external users</description>
  <license>
    <title>License</title>
    <text>By clicking OK you agree ....</text>
  </license>
  <acl id="external"/>

  <!-- Other config items here -->
<client:config>

is equivalent to

Code Block

<client:config id="external">
  <title>External Client</title>
  <description>Client for access by external users</description>
  <license>
    <title>License</title>
    <text>By clicking OK you agree ....</text>
  </license>
  <acl id="external"/>

  <!-- Other config items here -->
<client:config>

<client:config id="internal">
  <title>Internal Client</title>
  <description>Client for access by internal users</description>
  <acl id="internal"/>

  <!-- Other config items here -->
<client:config>

Some other things you could do would be to set the publish flag to false in the alias configuration, so that the aliased client configuration won't show up in the users list of available configs (but the can still access it using a direct url), which is handy for client configurations that are used for third party integration.

Code Block

<client:config id="main">
  <alias id="pathway">
    <title>Pathway Client</title>
    <description>Client to be used when called from Pathway</description>
    <license xsi:nil="true"/>
    <publish>false</publish>
  </alias>

  <title>Default Client</title>
  <description>General client for use by users</description>
  <license>
    <title>License</title>
    <text>By clicking OK you agree ....</text>
  </license>

  <!-- Other config items here -->
<client:config>

Adjusting the panel collapse buttons

The buttons used to expand and collapse the panel can be too small for some users, but since these buttons are just images they can be updated to use a different images.

Small collapse buttonImage Added

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.

Larger collapse buttonsImage Added

To use the updated buttons you need to download the file above and copy it to the weave\platform\plugins directory, then edit the weave\platform\configuration\config.ini file to include that bundle in the list of bundle to start when Weave is started.

Editing config.iniImage Added

After adding the new bundle you'll either need to use the osgi console to start the bundle manually, the first time, or restart the Weave instance, to have the new bundle started and available for use.

Then you have to add the theme to the client config, along with any existing theme you're currently using.

Editing client configImage Added

Info

As of Weave 2.5.18 this bundle is already included and setup so all you need to do is the last step to add the collapse theme to your client config.

 

Further Reading