.. _config-resource-options-label: ============================== Resource options for widgets ============================== Here's a complete list of all *Resource options* that are specifically used by *Widgets* : copyFieldList -------------- * *String value*, a comma-separated list of resource field names * **Optional** for *Widgets* : * :ref:`widget-editfeature-copy-label` delegateContext ---------------- * *String value*, label to use for the delegate context button * **Optional** for *Widgets* : * :ref:`widget-resultextgrid-label` editable --------- * *Boolean value*, defaults to *false*. * **Mandatory** for *Widgets* : * :ref:`widget-editfeature-create-label` * :ref:`widget-editfeature-update-label` * :ref:`widget-editfeature-delete-label` * :ref:`widget-featurepanel-customform-label` editType --------- * *String value*. Possible values are listed below. * Can be defined more than once * **editable** resource option must be set to true. * **Optional** for all the widgets listed below. * (Default) If not set, then all edit feature widgets are linked to the resource * If set one or more times, then only the edit feature widgets of the according option value will be linked to the resource. * Possible values (left) and the according widget(s) it adds (right) are : :copy: :ref:`widget-editfeature-copy-label` :create: :ref:`widget-editfeature-create-label` :delete: :ref:`widget-editfeature-delete-label` :drag: :ref:`widget-editfeature-drag-label` :update: :ref:`widget-editfeature-update-label` .. note:: The :ref:`widget-editfeature-split-label` widget doesn't use this option because it already has its own resource option : splittable. filterable ----------- * *Boolean value*, defaults to *false*. * **Mandatory** for *Widgets* : * :ref:`widget-wfsfilterbuilder-label` * :ref:`widget-applyfilter-label` geometryTypeString ------------------- * *String value*. Defines the type of geometry the resource is. Possible values are **(case sensitive)**: * Point * LineString * Polygon * **Mandatory** for *Widgets* : * :ref:`widget-editfeature-create-label` group ------ * *String value*. Defines where to put the layer nodes inside layer trees. If not defined, the resource layers won't be added to the tree. If left blank, the resource layers will be added to the root of the tree. Else, each word separated by a "/" is considered a node inside of which to add the next node. If more than one is defined, nodes are contained inside the parent's node (the first being put inside the tree root). For example : .. code-block:: xml gmap/polygons/small This will create a 'gmap' node put inside root, a 'polygons' node inside 'gmap', a 'small' node inside 'polygons' and resource layer nodes are going to be put inside the 'small' node. **Nodes also support i18n**. In order to do so, use the following structure when defining a node (a string between "**@**" and separated by "**:**" in the middle, the left defines the domain name and the right is the key) : .. code-block:: xml @mydomain:mykey@ You can combine both methods in any way you want : .. code-block:: xml @gmapdomain:gmapkey@/polygons/@otherdomain:smallkey@ * Can be defined by service type ** * **Optional** for *Widgets* : * :ref:`widgets-geoextux-layertreebuilder-label` iconClsCreate -------------- * *String value*. The CSS class selector that specifies an alternative background image to be used by *EditFeature_Create* widget icons editing this resource. * **Optional** for *Widgets* : * :ref:`widget-editfeature-create-label` .. note:: This resource option is also supported in the XML configs. iconClsDelete -------------- * *String value*. The CSS class selector that specifies an alternative background image to be used by *EditFeature_Delete* widget icons editing this resource. * **Optional** for *Widgets* : * :ref:`widget-editfeature-delete-label` .. note:: This resource option is also supported in the XML configs. iconClsUpdate -------------- * *String value*. The CSS class selector that specifies an alternative background image to be used by *EditFeature_Update* widget icons editing this resource. * **Optional** for *Widgets* : * :ref:`widget-editfeature-update-label` .. note:: This resource option is also supported in the XML configs. ignoredField -------------- * *String value*. The fields that we don't want to view in search fields. * **Optional** for *Widgets* : * :ref:`widget-wfsfilterbuilder-label` * :ref:`widget-applyfilter-label` initViewField -------------- * *String value*. Must be set to the **name** of the field used for querying. If not defined, the primary key is used. * **Optional** for *Widgets* : * :ref:`widget-initialview-label` initViewUrlField ----------------- * *String value*. Must be set to the value we want to have in the url that will contain the id of the feature we need to zoom to. * **Mandatory** for *Widgets* : * :ref:`widget-initialview-label` layertreepath -------------- * *String value*. Defines where to put the layer nodes inside layer trees. If not defined, the resource layers won't be added to the tree. If left blank, the resource layers will be added to the root of the tree. Else, each word separated by a "/" is considered a node inside of which to add the next node. If more than one is defined, nodes are contained inside the parent's node (the first being put inside the tree root). For example : .. code-block:: xml gmap/polygons/small This will create a 'gmap' node put inside root, a 'polygons' node inside 'gmap', a 'small' node inside 'polygons' and resource layer nodes are going to be put inside the 'small' node. **Nodes also support i18n**. In order to do so, use the following structure when defining a node (a string between "**@**" and separated by "**:**" in the middle, the left defines the domain name and the right is the key) : .. code-block:: xml @mydomain:mykey@ You can combine both methods in any way you want : .. code-block:: xml @gmapdomain:gmapkey@/polygons/@otherdomain:smallkey@ * Can be defined by service type ** * **Mandaroty** for *Widgets* : * :ref:`widget-mapfishlayertree-label` mapGrid -------- * *Boolean value*, defaults to *false*. Setting this to true tells GeoPrisma that the resource represents a map grid, which can be used by various widgets. * **Optional** for *Widgets* : * :ref:`widget-geoextprintform-label` noLayer -------- * *Boolean value*, defaults to *false*. If set to true, no layer object will be created for the resource. * **Optional** for *Widgets* : * :ref:`widget-layer-label` * :ref:`widget-wfsfilterbuilder-label` overview --------- * *Boolean value*, defaults to *false*. When set, the resource can be used as a map overview in addition to being displayed in the regular map. * **Optional** for *Widgets* : * :ref:`widget-overviewmap-label` primaryField ------------- * *String value*. Defines the **name** of the primary key field of the resource. * **Mandatory** for *Widgets* : * :ref:`widget-featurepanel-selector-label` (defines the field of the data result to display) * :ref:`widget-wfsfilterbuilder-label` * **Optional** for *Widgets* : * :ref:`widget-queryonclick-label` (avoids selecting the same feature multiple times when in 'multiple' query mode by using the primaryField to compare. See doc of widget to know more). queryable ---------- * *Boolean value*, defaults to *false*. * **Mandatory** for *Widgets* : * :ref:`widget-queryonclick-label` result ------- * *String value*. If defined, determine which kind of query result *Widget* to use with for this *Resource*. Possible values are : * *resultextgrid* * *featurepanelselector* * **Mandatory** for *Widgets* : * :ref:`widget-resultextgrid-label` * :ref:`widget-featurepanel-selector-label` visibility ----------- * *Boolean value*, defaults to *true*. * **Optional** for *Widgets* : * :ref:`widget-mapfishlayertree-label` * Can be defined by service type ** * Also used when automatically creating *Layer* nodes selectorTemplateHeight ----------------------- * *Integer value*. Will set the height of the template window popuped by the FeaturePanel_Selector widget. * **Optional** for *Widgets* : * :ref:`widget-editfeature-copy-label` * :ref:`widget-editfeature-create-label` * :ref:`widget-editfeature-update-label` * :ref:`widget-featurepanel-selector-label` * :ref:`widget-wfsfilterbuilder-label` selectorMethod --------------- * *String value*. Must be set to the **name** of the JavaScript method returning a new instance of the Ext.Container to use as the form. * **Optional** for *Widgets* : * :ref:`widget-editfeature-copy-label` * :ref:`widget-editfeature-create-label` * :ref:`widget-editfeature-update-label` * :ref:`widget-featurepanel-selector-label` * :ref:`widget-wfsfilterbuilder-label` selectorTemplate ----------------- * *String value*. Must be set to the **path** of the .php script to use for showing the result. * **Optional** for *Widgets* : * :ref:`widget-featurepanel-selector-label` selectorTitle -------------- * *String value*. Default value is the resource title if not provided. See widget for more info. * **Optional** for *Widgets* : * :ref:`widget-featurepanel-selector-label` selectorTemplateWidth ---------------------- * *Integer value*. Will set the width of the template window popuped by the FeaturePanel_Selector widget. * **Optional** for *Widgets* : * :ref:`widget-editfeature-copy-label` * :ref:`widget-editfeature-create-label` * :ref:`widget-editfeature-update-label` * :ref:`widget-featurepanel-selector-label` * :ref:`widget-wfsfilterbuilder-label` toggleResource --------------- * *String value*. Must be name (id) of another resource. * **Mandatory** for *Widgets* : * :ref:`widget-toggle-label` tooltipTextCreate ------------------ * *String value*. Text to display for the editing widget (create) for the tooltip. * **Optional** for *Widgets* : * :ref:`widget-editfeature-create-label` .. note:: This resource option is also supported in the XML configs. .. note:: This resource option supports :ref:`i18n-label`. tooltipTextDelete ------------------ * *String value*. Text to display for the editing widget (delete) for the tooltip. * **Optional** for *Widgets* : * :ref:`widget-editfeature-delete-label` .. note:: This resource option is also supported in the XML configs. .. note:: This resource option supports :ref:`i18n-label`. tooltipTextUpdate ------------------ * *String value*. Text to display for the editing widget (update) for the tooltip. * **Optional** for *Widgets* : * :ref:`widget-editfeature-update-label` .. note:: This resource option is also supported in the XML configs. .. note:: This resource option supports :ref:`i18n-label`. zoomField ---------- * *String value*. Must be set to the **name** of the field used for querying * **Mandatory** for *Widgets* : * :ref:`widget-shortcut-label` * :ref:`widget-mapfishrecenter-label` * Can be defined more than once ** .. _config-resource-options-other-label: ======================== Other resource options ======================== **A Resource can also have all options of a Layer node** as defined inside the original *Map* widget. They are not listed above since they are not options that are read by widgets, but used to build *OpenLayers.Layer* objects. See (:ref:`widgets-map-layer-options-label`) for the complete option list. ======================================== Important notes about resource options ======================================== .. note:: **Boolean values** must be set to either **true** or **false** .. note:: **Can be defined by service type** means that you can have the same option defined in a unique way per service type. The way to do so is to define a *option + the service type*, which will overwrite the value of the original option for the defined service type. For example, defining a *layertreepathwms* would make all *wms* layers going to use this option instead of the original *layertreepath*. The original option always remains mandatory and service type options are always considered optionals. All OpenLayers.Layer property can be set as a valid Resource option with with a service type added to it, for example "minScalewms" is valid. .. note:: **Can be defined more than once** simply means a *Resource* can have this option multiple times. By default, only one option per type is supported for each *Resource*.