GeoPrisma logo

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 :

delegateContext

  • String value, label to use for the delegate context button
  • Optional for Widgets :

editable

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:EditFeature_Copy
create:EditFeature_Create
delete:EditFeature_Delete
drag:EditFeature_Drag
update:EditFeature_Update

Note

The EditFeature_Split widget doesn’t use this option because it already has its own resource option : splittable.

filterable

geometryTypeString

  • String value. Defines the type of geometry the resource is. Possible values are (case sensitive):
    • Point
    • LineString
    • Polygon
  • Mandatory for Widgets :

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 :

    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) :

    @mydomain:mykey@
    

    You can combine both methods in any way you want :

    @gmapdomain:gmapkey@/polygons/@otherdomain:smallkey@
    
  • Can be defined by service type **

  • Optional for Widgets :

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 :

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 :

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 :

Note

This resource option is also supported in the XML configs.

ignoredField

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 :

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 :

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 :

    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) :

    @mydomain:mykey@
    

    You can combine both methods in any way you want :

    @gmapdomain:gmapkey@/polygons/@otherdomain:smallkey@
    
  • Can be defined by service type **

  • Mandaroty for Widgets :

noLayer

  • Boolean value, defaults to false. If set to true, no layer object will be created for the resource.
  • Optional for Widgets :

primaryField

  • String value. Defines the name of the primary key field of the resource.
  • Mandatory for Widgets :
  • Optional for Widgets :
    • QueryOnClick (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 :

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 :

visibility

  • Boolean value, defaults to true.
  • Optional for Widgets :
  • Can be defined by service type **
  • Also used when automatically creating Layer nodes

selectorTemplateHeight

selectorMethod

selectorTemplate

  • String value. Must be set to the path of the .php script to use for showing the result.
  • Optional for Widgets :

selectorTitle

  • String value. Default value is the resource title if not provided. See widget for more info.
  • Optional for Widgets :

selectorTemplateWidth

toggleResource

  • String value. Must be name (id) of another resource.
  • Mandatory for Widgets :

tooltipTextCreate

  • String value. Text to display for the editing widget (create) for the tooltip.
  • Optional for Widgets :

Note

This resource option is also supported in the XML configs.

Note

This resource option supports i18n (internationalization).

tooltipTextDelete

  • String value. Text to display for the editing widget (delete) for the tooltip.
  • Optional for Widgets :

Note

This resource option is also supported in the XML configs.

Note

This resource option supports i18n (internationalization).

tooltipTextUpdate

  • String value. Text to display for the editing widget (update) for the tooltip.
  • Optional for Widgets :

Note

This resource option is also supported in the XML configs.

Note

This resource option supports i18n (internationalization).

zoomField

  • String value. Must be set to the name of the field used for querying
  • Mandatory for Widgets :
  • Can be defined more than once **

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 (Layer Options) 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.