1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
3 | |
---|
4 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
5 | <head> |
---|
6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
7 | |
---|
8 | <title>GeoExt.form.FormPanel — GeoExt v1.0</title> |
---|
9 | <link rel="stylesheet" href="../../../../_static/geoext.css" type="text/css" /> |
---|
10 | <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" /> |
---|
11 | <script type="text/javascript"> |
---|
12 | var DOCUMENTATION_OPTIONS = { |
---|
13 | URL_ROOT: '../../../../', |
---|
14 | VERSION: '1.0', |
---|
15 | COLLAPSE_MODINDEX: false, |
---|
16 | FILE_SUFFIX: '.html', |
---|
17 | HAS_SOURCE: true |
---|
18 | }; |
---|
19 | </script> |
---|
20 | <script type="text/javascript" src="../../../../_static/jquery.js"></script> |
---|
21 | <script type="text/javascript" src="../../../../_static/doctools.js"></script> |
---|
22 | <link rel="shortcut icon" href="../../../../_static/favicon.ico"/> |
---|
23 | <link rel="top" title="GeoExt v1.0" href="../../../../index.html" /> |
---|
24 | <link rel="up" title="Widgets" href="../../widgets.html" /> |
---|
25 | <link rel="next" title="GeoExt.form.SearchAction" href="SearchAction.html" /> |
---|
26 | <link rel="prev" title="GeoExt.form.BasicForm" href="BasicForm.html" /> |
---|
27 | |
---|
28 | |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | </head> |
---|
34 | <body> |
---|
35 | <div class="header"> |
---|
36 | <div class="wrap"> |
---|
37 | <h1 id="logo"><a href="../../../../index.html">GeoExt</a></h1> |
---|
38 | <ul id="top-nav"> |
---|
39 | <li class="first"><a href="../../../../docs.html">Documentation</a></li> |
---|
40 | <li><a href="../../../../examples.html">Examples</a></li> |
---|
41 | <li><a href="../../../../downloads.html">Download</a></li> |
---|
42 | <li><a href="http://trac.geoext.org/">Development</a></li> |
---|
43 | </ul> |
---|
44 | <div id="searchbox"> |
---|
45 | <form class="search" action="../../../../search.html" method="get"> |
---|
46 | <input id="searchbox-query" type="text" name="q" size="25" value="Search …" tabindex="3" onblur="if(this.value=='') this.value='Search …';" onfocus="if(this.value=='Search …') this.value='';" /> |
---|
47 | <input id="searchbox-submit" type="image" value="Search" src="../../../../_static/img/search_icon_green.png" /> |
---|
48 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
49 | <input type="hidden" name="area" value="default" /> |
---|
50 | </form> |
---|
51 | </div> |
---|
52 | </div> |
---|
53 | </div> |
---|
54 | |
---|
55 | <div class="related"> |
---|
56 | <h3>Navigation</h3> |
---|
57 | <ul> |
---|
58 | <li><a href="../../../../index.html">GeoExt</a> »</li> |
---|
59 | <li><a href="../../../index.html" >API Reference</a> »</li> |
---|
60 | <li><a href="../../widgets.html" accesskey="U">Widgets</a> »</li> |
---|
61 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.form.FormPanel</span></tt></a></li> |
---|
62 | </ul> |
---|
63 | </div> |
---|
64 | |
---|
65 | <div class="sphinxsidebar"> |
---|
66 | <div class="sphinxsidebarwrapper"> |
---|
67 | <h3><a href="../../../../index.html">Table Of Contents</a></h3> |
---|
68 | <ul> |
---|
69 | <li><a class="reference external" href="#"><tt class="docutils literal"><span class="pre">GeoExt.form.FormPanel</span></tt></a><ul> |
---|
70 | <li><a class="reference external" href="#example-use">Example Use</a></li> |
---|
71 | <li><a class="reference external" href="#config-options">Config Options</a></li> |
---|
72 | <li><a class="reference external" href="#public-methods">Public Methods</a></li> |
---|
73 | </ul> |
---|
74 | </li> |
---|
75 | </ul> |
---|
76 | |
---|
77 | <h4>Previous topic</h4> |
---|
78 | <p class="topless"><a href="BasicForm.html" |
---|
79 | title="previous chapter"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.form.BasicForm</span></tt></a></p> |
---|
80 | <h4>Next topic</h4> |
---|
81 | <p class="topless"><a href="SearchAction.html" |
---|
82 | title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.form.SearchAction</span></tt></a></p> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | |
---|
86 | |
---|
87 | <div class="document"> |
---|
88 | <div class="documentwrapper"> |
---|
89 | <div class="bodywrapper"> |
---|
90 | <div class="body"> |
---|
91 | |
---|
92 | <div class="section" id="geoext-form-formpanel"> |
---|
93 | <h1><a title="GeoExt.form.FormPanel" class="reference internal" href="#GeoExt.form.FormPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.form.FormPanel</span></tt></a><a class="headerlink" href="#geoext-form-formpanel" title="Permalink to this headline">¶</a></h1> |
---|
94 | <dl class="meta docutils"> |
---|
95 | <dt>Extends</dt> |
---|
96 | <dd><ul class="first last simple"> |
---|
97 | <li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.FormPanel">Ext.form.FormPanel</a></li> |
---|
98 | </ul> |
---|
99 | </dd> |
---|
100 | <dt>xtype</dt> |
---|
101 | <dd><tt class="docutils literal"><span class="pre">gx_formpanel</span></tt></dd> |
---|
102 | </dl> |
---|
103 | <dl class="class"> |
---|
104 | <dt id="GeoExt.form.FormPanel"> |
---|
105 | <em class="property">class </em><tt class="descclassname">GeoExt.form.</tt><tt class="descname">FormPanel</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#GeoExt.form.FormPanel" title="Permalink to this definition">¶</a></dt> |
---|
106 | <dd><p>A specific <tt class="docutils literal"><span class="pre">Ext.form.FormPanel</span></tt> whose internal form is a |
---|
107 | <a title="GeoExt.form.BasicForm" class="reference external" href="BasicForm.html#GeoExt.form.BasicForm"><tt class="xref docutils literal"><span class="pre">GeoExt.form.BasicForm</span></tt></a> instead of <tt class="docutils literal"><span class="pre">Ext.form.BasicForm</span></tt>. |
---|
108 | One would use this form to do search requests through |
---|
109 | an <tt class="docutils literal"><span class="pre">OpenLayers.Protocol</span></tt> object (<tt class="docutils literal"><span class="pre">OpenLayers.Protocol.WFS</span></tt> |
---|
110 | for example).</p> |
---|
111 | <p>Look at <a title="GeoExt.form.SearchAction" class="reference external" href="SearchAction.html#GeoExt.form.SearchAction"><tt class="xref docutils literal"><span class="pre">GeoExt.form.SearchAction</span></tt></a> to understand how |
---|
112 | form fields must be named for appropriate filters to be |
---|
113 | passed to the protocol.</p> |
---|
114 | </dd></dl> |
---|
115 | |
---|
116 | <div class="section" id="example-use"> |
---|
117 | <h2>Example Use<a class="headerlink" href="#example-use" title="Permalink to this headline">¶</a></h2> |
---|
118 | <p>Sample code showing how to use a GeoExt form panel.</p> |
---|
119 | <div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">formPanel</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">form</span><span class="p">.</span><span class="nx">FormPanel</span><span class="p">({</span> |
---|
120 | <span class="nx">renderTo</span><span class="o">:</span> <span class="s2">"formpanel"</span><span class="p">,</span> |
---|
121 | <span class="nx">protocol</span><span class="o">:</span> <span class="k">new</span> <span class="nx">OpenLayers</span><span class="p">.</span><span class="nx">Protocol</span><span class="p">.</span><span class="nx">WFS</span><span class="p">({</span> |
---|
122 | <span class="nx">url</span><span class="o">:</span> <span class="s2">"http://publicus.opengeo.org/geoserver/wfs"</span><span class="p">,</span> |
---|
123 | <span class="nx">featureType</span><span class="o">:</span> <span class="s2">"tasmania_roads"</span><span class="p">,</span> |
---|
124 | <span class="nx">featureNS</span><span class="o">:</span> <span class="s2">"http://www.openplans.org/topp"</span> |
---|
125 | <span class="p">}),</span> |
---|
126 | <span class="nx">items</span><span class="o">:</span> <span class="p">[{</span> |
---|
127 | <span class="nx">xtype</span><span class="o">:</span> <span class="s2">"textfield"</span><span class="p">,</span> |
---|
128 | <span class="nx">name</span><span class="o">:</span> <span class="s2">"name__ilike"</span><span class="p">,</span> |
---|
129 | <span class="nx">value</span><span class="o">:</span> <span class="s2">"mont"</span> |
---|
130 | <span class="p">},</span> <span class="p">{</span> |
---|
131 | <span class="nx">xtype</span><span class="o">:</span> <span class="s2">"textfield"</span><span class="p">,</span> |
---|
132 | <span class="nx">name</span><span class="o">:</span> <span class="s2">"elevation__ge"</span><span class="p">,</span> |
---|
133 | <span class="nx">value</span><span class="o">:</span> <span class="s2">"2000"</span> |
---|
134 | <span class="p">}],</span> |
---|
135 | <span class="nx">listeners</span><span class="o">:</span> <span class="p">{</span> |
---|
136 | <span class="nx">actioncomplete</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">form</span><span class="p">,</span> <span class="nx">action</span><span class="p">)</span> <span class="p">{</span> |
---|
137 | <span class="c1">// this listener triggers when the search request</span> |
---|
138 | <span class="c1">// is complete, the OpenLayers.Protocol.Response</span> |
---|
139 | <span class="c1">// resulting from the request is available</span> |
---|
140 | <span class="c1">// in "action.response"</span> |
---|
141 | <span class="p">}</span> |
---|
142 | <span class="p">}</span> |
---|
143 | <span class="p">});</span> |
---|
144 | |
---|
145 | <span class="nx">formPanel</span><span class="p">.</span><span class="nx">addButton</span><span class="p">({</span> |
---|
146 | <span class="nx">text</span><span class="o">:</span> <span class="s2">"search"</span><span class="p">,</span> |
---|
147 | <span class="nx">handler</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span> |
---|
148 | <span class="k">this</span><span class="p">.</span><span class="nx">search</span><span class="p">();</span> |
---|
149 | <span class="p">},</span> |
---|
150 | <span class="nx">scope</span><span class="o">:</span> <span class="nx">formPanel</span> |
---|
151 | <span class="p">});</span> |
---|
152 | </pre></div> |
---|
153 | </div> |
---|
154 | </div> |
---|
155 | <div class="section" id="config-options"> |
---|
156 | <h2>Config Options<a class="headerlink" href="#config-options" title="Permalink to this headline">¶</a></h2> |
---|
157 | <p>Configuration properties in addition to |
---|
158 | those listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.FormPanel">Ext.form.FormPanel</a>.</p> |
---|
159 | <dl class="describe"> |
---|
160 | <dt> |
---|
161 | <tt class="descname">protocol</tt></dt> |
---|
162 | <dd><tt class="docutils literal"><span class="pre">OpenLayers.Protocol</span></tt> The protocol instance this form panel |
---|
163 | is configured with, actions resulting from this form |
---|
164 | will be performed through the protocol.</dd></dl> |
---|
165 | |
---|
166 | </div> |
---|
167 | <div class="section" id="public-methods"> |
---|
168 | <h2>Public Methods<a class="headerlink" href="#public-methods" title="Permalink to this headline">¶</a></h2> |
---|
169 | <p>Public methods in addition to those |
---|
170 | listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.FormPanel">Ext.form.FormPanel</a>.</p> |
---|
171 | <dl class="method"> |
---|
172 | <dt id="GeoExt.form.FormPanel.search"> |
---|
173 | <tt class="descclassname">FormPanel.</tt><tt class="descname">search</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.form.FormPanel.search" title="Permalink to this definition">¶</a></dt> |
---|
174 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
175 | <col class="field-name" /> |
---|
176 | <col class="field-body" /> |
---|
177 | <tbody valign="top"> |
---|
178 | <tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>options</em> – <tt class="docutils literal"><span class="pre">Object</span></tt> The options passed to the |
---|
179 | <a title="GeoExt.form.SearchAction" class="reference external" href="SearchAction.html#GeoExt.form.SearchAction"><tt class="xref docutils literal"><span class="pre">GeoExt.form.SearchAction</span></tt></a> constructor.</td> |
---|
180 | </tr> |
---|
181 | </tbody> |
---|
182 | </table> |
---|
183 | <p>Shortcut to the internal form’s search method.</p> |
---|
184 | </dd></dl> |
---|
185 | |
---|
186 | </div> |
---|
187 | </div> |
---|
188 | |
---|
189 | |
---|
190 | </div> |
---|
191 | </div> |
---|
192 | </div> |
---|
193 | <div class="clearer"></div> |
---|
194 | </div> |
---|
195 | <div class="related"> |
---|
196 | <h3>Navigation</h3> |
---|
197 | <ul> |
---|
198 | <li class="right" style="margin-right: 10px"> |
---|
199 | <a href="../../../../genindex.html" title="General Index" |
---|
200 | accesskey="I">index</a></li> |
---|
201 | <li class="right" > |
---|
202 | <a href="../../../../modindex.html" title="Global Module Index" |
---|
203 | accesskey="M">modules</a> |</li> |
---|
204 | <li class="right" > |
---|
205 | <a href="SearchAction.html" title="GeoExt.form.SearchAction" |
---|
206 | accesskey="N">next</a> |</li> |
---|
207 | <li class="right" > |
---|
208 | <a href="BasicForm.html" title="GeoExt.form.BasicForm" |
---|
209 | accesskey="P">previous</a> |</li> |
---|
210 | <li><a href="../../../../index.html">GeoExt</a> »</li> |
---|
211 | <li><a href="../../../index.html" >API Reference</a> »</li> |
---|
212 | <li><a href="../../widgets.html" >Widgets</a> »</li> |
---|
213 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.form.FormPanel</span></tt></a></li> |
---|
214 | </ul> |
---|
215 | </div> |
---|
216 | |
---|
217 | <div class="footer"> |
---|
218 | © Copyright 2009-2010, GeoExt Community. |
---|
219 | </div> |
---|
220 | </body> |
---|
221 | </html> |
---|