gxp.plugins.QueryForm¶
-
class
gxp.plugins.QueryForm(config)¶ Plugin for performing queries on feature layers TODO Replace this tool with something that is less like GeoEditor and more like filtering.
Config Options¶
Configuration properties in addition to those listed for Ext.util.Observable.
-
actions ObjectBy default, this tool creates a “Query” action to trigger the output of this tool’s form. Set to null if you want to include the form permanently in your layout.
-
actionTarget ObjectorStringorArrayWhere to place the tool’s actions (e.g. buttons or menus)?In case of a string, this can be any string that references an
Ext.Containerproperty on the portal, or a unique id configured on a component.In case of an object, the object has a “target” and an “index” property, so that the tool can be inserted at a specified index in the target.
actionTarget can also be an array of strings or objects, if the action is to be put in more than one place (e.g. a button and a context menu item).
To reference one of the toolbars of an
Ext.Panel, ”.tbar”, ”.bbar” or ”.fbar” has to be appended. The default is “map.tbar”. The viewer’s main MapPanel can always be accessed with “map” as actionTarget. Set to null if no actions should be created.Some tools provide a context menu. To reference this context menu as actionTarget for other tools, configure an id in the tool’s outputConfig, and use the id with ”.contextMenu” appended. In the snippet below, a layer tree is created, with a “Remove layer” action as button on the tree’s top toolbar, and as menu item in its context menu:
{ xtype: "gxp_layertree", outputConfig: { id: "tree", tbar: [] } }, { xtype: "gxp_removelayer", actionTarget: ["tree.tbar", "tree.contextMenu"] }
If a tool has both actions and output, and you want to force it to immediately output to a container, set actionTarget to null. If you want to hide the actions, set actionTarget to false. In this case, you should configure a defaultAction to make sure that an action is active.
-
autoActivate BooleanSet to false if the tool should be initialized without activating it. Default is true.
-
autoExpand StringIf set to the id of a container, the container will be expanded when the Query Form is enabled, and collapsed when it is disabled. Once the user manually expands/collapses the contaienr, the user setting will stick for the current session.
-
autoHide BooleanSet to true if the output of this tool goes into anExt.Windowthat should be hidden when the query result is available. Default is false.
-
cancelButtonText StringText for cancel button (i18n).
-
controlOptions ObjectIf this tool is associated with anOpenLayers.Controlthen this is an optional object to pass to the constructor of the associatedOpenLayers.Control.
-
defaultAction NumberOptional index of an action that should be active by default. Only works for actions that are aGeoExt.Actioninstance.
-
featureManager StringThe id of thegxp.plugins.FeatureManagerto use with this tool.
-
noFeaturesMsg StringText for no features alert message (i18n)
-
noFeaturesTitle StringText for no features alert title (i18n)
-
outputAction NumberBy default, the “Query” action will trigger this tool’s form output. There is no need to change this unless you configure customactions.
-
outputConfig ObjectOptional configuration for the output container. This may be useful to override the xtype (e.g. “window” instead of “gx_popup”), or to provide layout configurations when rendering to anoutputTarget.
-
outputTarget StringWhere to add the tool’s output container? This can be any string that references anExt.Containerproperty on the portal, or “map” to access the viewer’s main map. If not provided, a window will be created. To reference one of the toolbars of anExt.Panel, ”.tbar”, ”.bbar” or ”.fbar” has to be appended.
-
queryActionText StringText for query action (i18n).
-
queryActionTip StringText for query action tooltip (i18n).
-
queryByAttributesText StringText for query by attributes (i18n).
-
queryByLocationText StringText for query by location (i18n).
-
queryMenuText StringText for query menu item (i18n).
-
queryMsg StringText for query load mask (i18n).
-
showButtonText Show the
buttonTextan action is configured with, if used as a button. Default is false.
-
toggleGroup StringIf this tool should be radio-button style toggled with other tools, this string is to identify the toggle group.
Public Properties¶
Public properties in addition to those listed for Ext.util.Observable.
-
QueryForm.active¶ BooleanIs the tool currently active?
Public Methods¶
Public methods in addition to those listed for Ext.util.Observable.
-
QueryForm.activate()¶ Returns: Booleantrue when this tool was activatedActivates this tool.
-
QueryForm.addActions()¶
-
QueryForm.addOutput()¶
-
QueryForm.deactivate()¶ Returns: Booleantrue when this tool was deactivatedDeactivates this tool.
-
QueryForm.getState()¶ :return {Object} Gets the configured tool state. Overwrite in subclasses to return anything other than a copy of the initialConfig property.
-
QueryForm.removeOutput()¶ Removes all output created by this tool
Events¶
Events in addition to those listed for Ext.util.Observable.
-
activate Fired when the tool is activated.
Listener arguments: * tool -
gxp.plugins.Toolthe activated tool
-
deactivate Fired when the tool is deactivated.
Listener arguments: * tool -
gxp.plugins.Toolthe deactivated tool