GeoExt

Table Of Contents

Previous topic

GeoExt.plugins.PrintExtent

Next topic

GeoExt.plugins.PrintProviderField

GeoExt.plugins.PrintPageField

Extends
ptype
gx_printpagefield
class GeoExt.plugins.PrintPageField

A plugin for Ext.form.Field components which provides synchronization with a GeoExt.data.PrintPage. The field name has to match the respective property of the printPage (e.g. scale, rotation).

Example Use

A form with a combo box for the scale and text fields for rotation and a page title. The page title is a custom parameter of the print module’s page configuration:

var printPage = new GeoExt.data.PrintPage({
    printProvider: new GeoExt.data.PrintProvider({
        capabilities: printCapabilities
    })
});
new Ext.form.FormPanel({
    renderTo: "form",
    width: 200,
    height: 300,
    items: [{
        xtype: "combo",
        displayField: "name",
        store: printPage.scales, // printPage.scale
        name: "scale",
        fieldLabel: "Scale",
        typeAhead: true,
        mode: "local",
        forceSelection: true,
        triggerAction: "all",
        selectOnFocus: true,
        plugins: new GeoExt.plugins.PrintPageField({
            printPage: printPage
        })
    }, {
        xtype: "textfield",
        name: "rotation", // printPage.rotation
        fieldLabel: "Rotation",
        plugins: new GeoExt.plugins.PrintPageField({
            printPage: printPage
        })
    }, {
        xtype: "textfield",
        name: "mapTitle", // printPage.customParams["mapTitle"]
        fieldLabel: "Map Title",
        plugins: new GeoExt.plugins.PrintPageField({
            printPage: printPage
        })
    }]
});

Config Options

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

printPage
GeoExt.data.PrintPage The print page to synchronize with.