source:
trunk/workshop-routing-foss4g/web/GeoExt/docs/_sources/lib/GeoExt/plugins/PrintProviderField.txt
@
76
Revision 76, 2.5 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[76] | 1 | |
2 | .. currentmodule:: GeoExt.plugins | |
3 | ||
4 | :class:`GeoExt.plugins.PrintProviderField` | |
5 | ================================================================================ | |
6 | ||
7 | ||
8 | .. cssclass:: meta | |
9 | ||
10 | ||
11 | Extends | |
12 | * `Ext.util.Observable <http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable>`_ | |
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ptype | |
19 | ``gx_printproviderfield`` | |
20 | ||
21 | ||
22 | ||
23 | .. class:: PrintProviderField | |
24 | ||
25 | A plugin for ``Ext.form.Field`` components which provides synchronization | |
26 | with a :class:`GeoExt.data.PrintProvider`. | |
27 | ||
28 | ||
29 | ||
30 | Example Use | |
31 | ----------- | |
32 | ||
33 | A form with combo boxes for layout and resolution, and a text field for a | |
34 | map title. The latter is a custom parameter to the print module, which is | |
35 | a default for all print pages. For setting custom parameters on the page | |
36 | level, use :class:`GeoExt.plugins.PrintPageField`): | |
37 | ||
38 | .. code-block:: javascript | |
39 | ||
40 | var printProvider = new GeoExt.data.PrintProvider({ | |
41 | capabilities: printCapabilities | |
42 | }); | |
43 | new Ext.form.FormPanel({ | |
44 | renderTo: "form", | |
45 | width: 200, | |
46 | height: 300, | |
47 | items: [{ | |
48 | xtype: "combo", | |
49 | displayField: "name", | |
50 | store: printProvider.layouts, // printProvider.layout | |
51 | fieldLabel: "Layout", | |
52 | typeAhead: true, | |
53 | mode: "local", | |
54 | forceSelection: true, | |
55 | triggerAction: "all", | |
56 | selectOnFocus: true, | |
57 | plugins: new GeoExt.plugins.PrintProviderField({ | |
58 | printProvider: printProvider | |
59 | }) | |
60 | }, { | |
61 | xtype: "combo", | |
62 | displayField: "name", | |
63 | store: printProvider.dpis, // printProvider.dpi | |
64 | fieldLabel: "Resolution", | |
65 | typeAhead: true, | |
66 | mode: "local", | |
67 | forceSelection: true, | |
68 | triggerAction: "all", | |
69 | selectOnFocus: true, | |
70 | plugins: new GeoExt.plugins.PrintProviderField({ | |
71 | printProvider: printProvider | |
72 | }) | |
73 | }, { | |
74 | xtype: "textfield", | |
75 | name: "mapTitle", // printProvider.customParams.mapTitle | |
76 | fieldLabel: "Map Title", | |
77 | plugins: new GeoExt.plugins.PrintProviderField({ | |
78 | printProvider: printProvider | |
79 | }) | |
80 | }] | |
81 | }): | |
82 | ||
83 | ||
84 | ||
85 | ||
86 | Config Options | |
87 | -------------- | |
88 | ||
89 | Configuration properties in addition to | |
90 | those listed for `Ext.util.Observable <http://dev.sencha.com/deploy/dev/docs/?class=Ext.util.Observable>`_. | |
91 | ||
92 | ||
93 | .. describe:: printProvider | |
94 | ||
95 | ``GeoExt.data.PrintProvider`` The print provider to use with this | |
96 | plugin's field. Not required if set on the owner container of the | |
97 | field. | |
98 | ||
99 | ||
100 | ||
101 | ||
102 | ||
103 | ||
104 | ||
105 | ||
106 |
Note: See TracBrowser
for help on using the repository browser.