Creating Custom Property Pages for Manager

This topic describes creating custom property page for SOEs for ArcGIS Server Manager.

As explained in the “Adding Properties to SOEs” topic, properties allow modification of behavior of SOEs at runtime. You can modify values of these properties using ArcMap/ArcCatalog’s Service Editor dialog or ArcGIS Server Manager. This topic describes editing property values in Manager using a custom property page for Manager.
When you wish to modify values of SOE properties in ArcGIS Manager, you must log into Manager, click on the map service, select “Capabilities” and then select your SOE from the list of the map service’s capabilities. When an SOE is selected, its REST/SOAP URLs, allowed operations, and properties are displayed. You will notice that in the properties section, an editable text box is rendered for each property by default. To modify values, you must enter new text in these boxes and then click “Save and Restart” to restart the map service and the SOE for these new values to take effect.
The provision of simple text boxes to accept new property values is the default behavior of Manager. This ensures that a simple out-of-the-box user experience is available for all SOEs that have properties. However, property values are not always textual in nature, and the use of text boxes alone as user interface media leaves ample scope for users to enter incorrect or vague values for properties that need accurate and precise values.  In such scenarios, richer and more appropriate user interface elements such as drop-down boxes, lists, checkboxes, radio buttons, etc. are necessary to present the true nature of the properties and elicit accurate and precise values from the server administrator.
To cater to such scenarios, Manager provides an extension mechanism whereby SOE developers can create their own custom user interface widgets using the Dojo JavaScript library and integrate it with a property page. Let’s use the above SimpleRESTSOEWithProperties SOE to illustrate a custom property page. This SOE has the following properties:
Type of layer the SOE needs to look for, from among a limited list such as feature, raster or all.
Maximum number of features the SOE can return.
Format in which information must be returned to the client app. Some acceptable formats are json, html and text.
Indicates if new features could be created and saved to the geodatabase via an SOE operation.
Since the layerType property corresponds to the type of layers in a map, possible values are limited to “feature”, “raster”, and “all” for the sake of this example. Thus, a radio button group or a drop-down list would be appropriate to convey existence of such a domain. Let’s choose a radio button group for this property.
A text box seems an appropriate user interface element for the maxNumFeatures property, since a numeric value is required.
The returnFormat property value is also restricted to three possibilities, namely html, json and text. Lets use a drop-down combo box user interface element.
The isEditable property is a flag that indicates if certain functionality (in this case, editing) should be enabled or not. A checkbox is the best user interface element to accept boolean information.
Thus, the customized property page would then look like the following:
How to create a custom property page
A custom property page can be created during SOE creation time. If using the Eclipse wizard to create an SOE, after creating properties and their default values on the “Properties” page of the wizard, check the “Customize property page for ArcGIS Server Manager” checkbox to indicate the desire to create a custom property page for Manager. Remember to uncheck the “Create a Java Swing class…” check box, since this topic does not discuss property pages for ArcGIS Manager. To learn more about creating custom property pages for Manager, see the “Creating Custom Property Pages for ArcMap” topic.
When you click “Finish”, ensure that a folder called “Resources” is created in your Eclipse project.
This folder will have a folder structure that mimics your SOE’s package structure. This hierarchy will end with a sub-folder named after your SOE, which will contain a JavaScript file called Config.js and its dependencies.
Components of a custom property page
A custom property page for ArcGIS Manager is a Dojo widget that Manager loads and renders in real time. The simplest implementation of this widget as a custom property page requires a JavaScript file called Config.js, which defines a Dojo class with setter and getter functions for each property. Such implementation depends on declarations of the user interface HTML elements in an html file.  A custom property page, thus, has at the least the following components:
  • The Config.js file: The Config.js file is the entry point into the custom property page and thus must always be named “Config.js”. The setter and getter functions defined in this file use the dojoAttachPoint attribute to refer to appropriate DOM nodes in the html template, and are called by Manager to get and set property values when appropriate.
  • The HTML file: This is named after the SOE and resides in the templates folder. This HTML file defines and lays out all Dojo and HTML user interface elements. In the above sample, this HTML file contains an HTML table, with each row in the table holding a separate Dojo element.
In order to accommodate custom property pages for multiple SOEs simultaneously, Manager imposes certain constraints on property page widgets. These are:
  • The file that defines the Dojo widget must be named Config.js. Use of any other name would render the custom property page inaccessible to Manager during runtime.
  • All such widgets must use “arcgis.soe.<fully qualified SOE name>” as their namespace.
The use of unique namespace for each SOE’s property page leaves you free to structure your custom property page implementations as you see fit, as long as the Config.js file is present. To develop your own custom property page, please refer to the one that’s part of the SimpleRESTSOEWithProperties ArcObject SDK sample.
Deploying and using a custom property page
The following is the workflow to deploy custom property page for SOEs in ArcGIS Manager:
  1. After you finish writing your SOE and its property page, open up the SOE Export wizard to select files to deploy with the SOE.
  2. Ensure that the “Resources” folder is selected.
  3. Click Finish to complete export.
  4. Log in to ArcGIS Server Manager.
  5. Deploy the .soe file to ArcGIS Server.
  6. Ensure that a map service is published.
  7. Edit the map service and click “Capabilities”.
  8. Click your SOE. Ensure that your custom property page is visible in the “Properties” section and is functional.
  9. Edit properties by interacting with the property page.
  10. Click “Save and Restart” to restart the map service.
  1. Consume the SOE to confirm your changes to property values.

Development licensingDeployment licensing