GeoPrisma logo

Attribute Filter Panel

Allows filtering of vector features based on logical operators applied on the feature attributes.

XML Sample

Sample configuration.

<attributefilterpanel>
        <name>MyAttributeFilterPanel</name>
        <options>
                <label>Attribute Filters</label>
                <filters>
                        <filter>
                                <name>geobidule</name>
                                <label>GeoBidule Filter</label>
                                <resourcename>R_FS_geobidule</resourcename>
                                <logical_op>and</logical_op>
                                <ignoreempty>true</ignoreempty>
                                <fields>
                                        <field>
                                                <name>color</name>
                                                <operator>eq</operator>
                                                <xtype>textfield</xtype>
                                                <label>Color = </label>
                                        </field>
                                        <field>
                                                <name>size</name>
                                                <operator>gt</operator>
                                                <xtype>textfield</xtype>
                                                <label>Size ></label>
                                        </field>
                                </fields>
                        </filter>
                        <filter>
                                <name>geobidule2</name>
                                <label>GeoBidule Filter II</label>
                                <resourcename>R_FS_geobidule</resourcename>
                                <logical_op>and</logical_op>
                                <ignoreempty>true</ignoreempty>
                                <fields>
                                        <field>
                                                <name>price</name>
                                                <operator>le</operator>
                                                <xtype>textfield</xtype>
                                                <label>Price &lt;= </label>
                                        </field>
                                        <field>
                                                <name>construction_date</name>
                                                <operator>gt</operator>
                                                <xtype>datefield</xtype>
                                                <label>Construction date ></label>
                                                <format>n/j/Y</format>
                                        </field>
                                </fields>
                        </filter>
                </filters>
        </options>
</attributefilterpanel>

drawWidget Sample

<xsl:template name="attributefilterpanel:drawWidget">
        <xsl:param name="pWidgetName" />

        <!-- <![CDATA[items: [objGPWidget]]><xsl:value-of select="$pWidgetName" />] -->
        <![CDATA[objGPWidget]]><xsl:value-of select="$pWidgetName" />

</xsl:template>

Mandatory Options

label:

The label to display in the widget panel’s title

filters:
A list of <filter> elements to construct the filter panels, with the

following sub-elements:

name:

The name of the filter panel

label:

The label to display in the filter panel’s title

resourcename:

The resource that identifies the layer to filter (must be a FeatureServer layer)

logical_op:

The logical operator (and/or) used to combine the filtering criteria (NOTE: for now, FeatureServer only supports “and”).

ignoreempty:

Set to true if you want to ignore criteria that are left empty; otherwise the comparison with the empty string is made for each criteria.

fields:
A list of <field> elements defining which fields to filter, containing the

following sub-elements:

name:The name of the feature attribute to filter
operator:Operator to use for the comparison (eq, ne, lt, le, gt, ge, like)
xtype:ExtJS xtype used to instanciate the control (e.g. textfield, datefield)
label:Text label to display above the control for the field to filter
format:(Optional) Used with a datefield to specify the date format (e.g. Y-m-d for something like 2010-12-31)

Optional Options

Service Type

featureserver

Widget Action

read

Table Of Contents

Previous topic

ZoomSlider

Next topic

EditFeature_Create

This Page