Navigation:  WebOffice author > Edit Menu > WebOffice Category > Tools > Tool Group Web Integration >

Web Integration - Custom Tool

Previous pageReturn to chapter overviewNext page

With WebOffice 10.5 SP2 it is possible to use custom tools. By using a custom tool it is possible to extend WebOffice 10.5 SP2 functionality with arbitrary tool functionality. Each configured custom tool will get its own toolbar button in the WebOffice html client. The custom tool functionality and the tool form can be implemented by SynerGIS or by the customer. Therefore the Esri API technology can be used. Furthermore WebOffice 10.5 SP2 provides an easy-to-use API which is implemented on

HTTP GET/POST protocol level (similar to ArcGIS Server REST API) or

JavaScript level (similar to ArcGIS Server Javascript API).

 

See figure below for the WebOffice 10.5 SP2 custom tool concept. The custom tool implementation may use arbitrary web technology and Esri API, this decision is totally up to the customer implementing the custom tool.

 

WebOffice 10.5 SP2 custom tool concept

WebOffice 10.5 SP2 custom tool concept

 

Web Integration - Custom Tool configuration

Web Integration - Custom Tool configuration

 

Property

Description

URL of external page

Full URL of external web page/application

Tool tip

Tool name shown as tool tip

Use tool?

Specify whether this Tool is available in the WebOffice 10.5 SP2 clients (Yes) or not (No).

Pass mode

Pass mode

HTTP: Pass coordinates and/or object keys from WebOffice 10.5 SP2 to the external web page via HTTP (parameters are added in the query string of the HTTP request)

Note: The custom tool form needs a target window (e.g. hidden iframe) called weboffice_tool_target. Parameters are sent to the configured 'URL of external page for passing parameters' using the target weboffice_tool_target.

JavaScript: Pass coordinates and/or object keys from WebOffice 10.5 SP2 to the external web page calling a JavaScript function of the configured web page

Note: The custom tool form needs to be accessible by javascript from inside the WebOffice 10.5 SP2 application window, therefore the tool form has to run inside the same HTTP domain. Parameters are sent to the javascript function of the custom tool configured in 'JavaScript function'.

JavaScript callback on close

JavaScript method called before closing the tool

Use HTTP Get

Pass parameters to external application via HTTP Get (or HTTP Post).

Note: These settings are only relevant if the pass mode HTTP is active.

URL of external page for passing parameters

Full URL of external web page/application used for passing parameters (Pass mode HTTP).

Pass user context (x-syn-login header field)?

Specifies if the user context of the user logged on to WebOffice 10.5 SP2 will get passed in the HTTP header.

Pass user context (base 64 Authorization header field)?

Specifies if the user context of the user logged on to WebOffice will get passed in the HTTP header.

Provide snap functionality?

Specifies if the snap functionality should be provided in the tool form or not.

JavaScript function

JavaScript function of external web page/application called by WebOffice 10.5 SP2.

e.g. ProcessWebOfficeCall(objKeys[],geom[][]).

Tool icon

In WebOffice 10.5 SP2 folder pub/images 10 icons are available (tool_01.gif to tool_10.gif). Icon size 16x16 pixel

Tool icon (mobile)

In WebOffice 10.5 SP2 folder pub/images/mobile the icon customtool_default.png is available.

External Tool-ID

Tool id used for external calls

Access control ID

Access control ID needed for access control based on WebOffice usermanagement.

If an ID is configured here (eg 'MY_CUSTOM_TOOL') and WebOffice usermanagement is used, the user role is checked whether it provides the necessary application right or not (according to the example the application right would be MY_CUSTOM_TOOL). If the necessary application right is not available, the button/link for accessing the external application will not be available in the WebOffice 10.5 SP2 client.

Visible in toolbar?

Tool visible?

Visible in Client

Tool visible in client?

Map View

Defines a specific map view to be displayed when this tool is chosen. If no map view is configured, the current map does not get changed.

Web Integration - Custom Tool configuration

 

The selection graphs as wells as the click icon can be adapted individually for each custom tool. The following design settings can only be used in the WebOffice core client.

The settings have to be made in the file <WebOffice 10.5 SP2 application>\client_core\jss\synergis_weboffice_user.xml. It is possible to adapt the following parameters:

 

<?xml version="1.0" encoding="UTF-8"?>

<data>

 <!--Icon for Click point, if "show click symbol is set to "true" on the specific custom tool-->

 <record jsxid="toolcustom.click.icon" jsxtext="http://w-ws-gimpl:8080/WebOffice_105_master/pub/images/dynsel_redcircle_small.gif"/

 <!--Width of icon-->

 <record jsxid="toolcustom.click.width" jsxtext="24"/>

 <!--Height of icon-->

 <record jsxid="toolcustom.click.height" jsxtext="24"/>

 <!--Offset X of icon-->

 <record jsxid="toolcustom.click.offset.x" jsxtext="12"/>

 <!--Offset Y of icon-->

 <record jsxid="toolcustom.click.offset.y" jsxtext="12"/>

 <!--Size of all vertices-->
 <record jsxid="toolcustom.vertex.size" jsxtext="6"/>

 <!--Color of all vertices-->

 <record jsxid="toolcustom.vertex.color" jsxtext="#DAA520"/>

 <!--Opacity of all vertices-->

 <record jsxid="toolcustom.vertex.opacity" jsxtext="1"/>

 <!--Line width-->

 <record jsxid="toolcustom.line.width" jsxtext="3"/>

 <!--Line color-->

 <record jsxid="toolcustom.line.color" jsxtext="#FFC700"/>

 <!--Opacity of line-->

 <record jsxid="toolcustom.line.opacity" jsxtext="1"/>

 <!--Opacity of fill (when operating with polygons)-->

 <record jsxid="toolcustom.fill.opacity" jsxtext="0.5"/>

 <!--Color of fill (when operating with polygons)-->

 <record jsxid="toolcustom.fill.color" jsxtext="#FDE17F"/>

<data>

 

Replace the parameter toolcustom with the corresponding external Tool-ID ​​defined for the custom tool. This allows different selection graphs and click icons to be used for each custom tool.

 

Note: Check sample custom tool implementations and detailed technical information (ToolCustom.txt) in folder pub/custom_tools of your WebOffice 10.5 SP2 application.

Note: See chapter How To ... Custom Tools for some examples about the custom tool.