A plugin for Ext.form.Field components which provides synchronization with a GeoExt.data.PrintProvider.
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
})
}]
}):
Configuration properties in addition to those listed for Ext.util.Observable.