GeoExt

Table Of Contents

Previous topic

GeoExt.plugins.PrintPageField

Next topic

GeoExt.plugins.TreeNodeActions

GeoExt.plugins.PrintProviderField

Extends
ptype
gx_printproviderfield
class GeoExt.plugins.PrintProviderField

A plugin for Ext.form.Field components which provides synchronization with a GeoExt.data.PrintProvider.

Example Use

A form with combo boxes for layout and resolution, and a text field for a map title. The latter is a custom parameter to the print module, which is a default for all print pages. For setting custom parameters on the page level, use GeoExt.plugins.PrintPageField):

var printProvider = new GeoExt.data.PrintProvider({
    capabilities: printCapabilities
});
new Ext.form.FormPanel({
    renderTo: "form",
    width: 200,
    height: 300,
    items: [{
        xtype: "combo",
        displayField: "name",
        store: printProvider.layouts, // printProvider.layout
        fieldLabel: "Layout",
        typeAhead: true,
        mode: "local",
        forceSelection: true,
        triggerAction: "all",
        selectOnFocus: true,
        plugins: new GeoExt.plugins.PrintProviderField({
            printProvider: printProvider
        })
    }, {
        xtype: "combo",
        displayField: "name",
        store: printProvider.dpis, // printProvider.dpi
        fieldLabel: "Resolution",
        typeAhead: true,
        mode: "local",
        forceSelection: true,
        triggerAction: "all",
        selectOnFocus: true,
        plugins: new GeoExt.plugins.PrintProviderField({
            printProvider: printProvider
        })
    }, {
        xtype: "textfield",
        name: "mapTitle", // printProvider.customParams.mapTitle
        fieldLabel: "Map Title",
        plugins: new GeoExt.plugins.PrintProviderField({
            printProvider: printProvider
        })
    }]
}):

Config Options

Configuration properties in addition to those listed for Ext.util.Observable.

printProvider
GeoExt.data.PrintProvider The print provider to use with this plugin’s field. Not required if set on the owner container of the field.