Bienvenue sur PostGIS.fr

Bienvenue sur PostGIS.fr , le site de la communauté des utilisateurs francophones de PostGIS.

PostGIS ajoute le support d'objets géographique à la base de données PostgreSQL. En effet, PostGIS "spatialise" le serverur PostgreSQL, ce qui permet de l'utiliser comme une base de données SIG.

Maintenu à jour, en fonction de nos disponibilités et des diverses sorties des outils que nous testons, nous vous proposons l'ensemble de nos travaux publiés en langue française.

source: trunk/workshop-routing-foss4g/web/GeoExt/docs/lib/GeoExt/widgets/form/SearchAction.html @ 76

Revision 76, 13.4 KB checked in by djay, 10 years ago (diff)

Ajout du répertoire web

  • Property svn:executable set to *
Line 
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.SearchAction &mdash; 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.grid.FeatureSelectionModel" href="../grid/FeatureSelectionModel.html" />
26    <link rel="prev" title="GeoExt.form.FormPanel" href="FormPanel.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 &hellip;" tabindex="3" onblur="if(this.value=='') this.value='Search &hellip;';" onfocus="if(this.value=='Search &hellip;') 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> &raquo;</li>
59          <li><a href="../../../index.html" >API Reference</a> &raquo;</li>
60          <li><a href="../../widgets.html" accesskey="U">Widgets</a> &raquo;</li>
61        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.form.SearchAction</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.SearchAction</span></tt></a><ul>
70<li><a class="reference external" href="#example-use">Example Use</a></li>
71<li><a class="reference external" href="#public-properties">Public Properties</a></li>
72</ul>
73</li>
74</ul>
75
76            <h4>Previous topic</h4>
77            <p class="topless"><a href="FormPanel.html"
78                                  title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.form.FormPanel</span></tt></a></p>
79            <h4>Next topic</h4>
80            <p class="topless"><a href="../grid/FeatureSelectionModel.html"
81                                  title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.grid.FeatureSelectionModel</span></tt></a></p>
82        </div>
83      </div>
84
85
86    <div class="document">
87      <div class="documentwrapper">
88        <div class="bodywrapper">
89          <div class="body">
90           
91  <div class="section" id="geoext-form-searchaction">
92<h1><a title="GeoExt.form.SearchAction" class="reference internal" href="#GeoExt.form.SearchAction"><tt class="xref docutils literal"><span class="pre">GeoExt.form.SearchAction</span></tt></a><a class="headerlink" href="#geoext-form-searchaction" title="Permalink to this headline">¶</a></h1>
93<dl class="meta docutils">
94<dt>Extends</dt>
95<dd><ul class="first last simple">
96<li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.Action">Ext.form.Action</a></li>
97</ul>
98</dd>
99</dl>
100<dl class="class">
101<dt id="GeoExt.form.SearchAction">
102<em class="property">class </em><tt class="descclassname">GeoExt.form.</tt><tt class="descname">SearchAction</tt><big>(</big><em>form</em>, <em>options</em><big>)</big><a class="headerlink" href="#GeoExt.form.SearchAction" title="Permalink to this definition">¶</a></dt>
103<dd><p>A specific <tt class="docutils literal"><span class="pre">Ext.form.Action</span></tt> to be used when using a form to do
104trigger search requests througn an <tt class="docutils literal"><span class="pre">OpenLayers.Protocol</span></tt>.</p>
105<p>Arguments:</p>
106<ul>
107<li><p class="first">form <tt class="docutils literal"><span class="pre">Ext.form.BasicForm</span></tt> A basic form instance.</p>
108</li>
109<li><dl class="first docutils">
110<dt>options <tt class="docutils literal"><span class="pre">Object</span></tt> Options passed to the protocol&#8217;read method</dt>
111<dd><p class="first last">One can add an abortPrevious property to these options, if set
112to true, the abort method will be called on the protocol if
113there&#8217;s a pending request.</p>
114</dd>
115</dl>
116</li>
117</ul>
118<p>When run this action builds an <tt class="docutils literal"><span class="pre">OpenLayers.Filter</span></tt> from the form
119and passes this filter to its protocol&#8217;s read method. The form fields
120must be named after a specific convention, so that an appropriate
121<tt class="docutils literal"><span class="pre">OpenLayers.Filter.Comparison</span></tt> filter is created for each
122field.</p>
123<p>For example a field with the name <tt class="docutils literal"><span class="pre">foo__like</span></tt> would result in an
124<tt class="docutils literal"><span class="pre">OpenLayers.Filter.Comparison</span></tt> of type
125<tt class="docutils literal"><span class="pre">OpenLayers.Filter.Comparison.LIKE</span></tt> being created.</p>
126<p>Here is the convention:</p>
127<ul class="simple">
128<li><tt class="docutils literal"><span class="pre">&lt;name&gt;__eq:</span> <span class="pre">OpenLayers.Filter.Comparison.EQUAL_TO</span></tt></li>
129<li><tt class="docutils literal"><span class="pre">&lt;name&gt;__ne:</span> <span class="pre">OpenLayers.Filter.Comparison.NOT_EQUAL_TO</span></tt></li>
130<li><tt class="docutils literal"><span class="pre">&lt;name&gt;__lt:</span> <span class="pre">OpenLayers.Filter.Comparison.LESS_THAN</span></tt></li>
131<li><tt class="docutils literal"><span class="pre">&lt;name&gt;__le:</span> <span class="pre">OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO</span></tt></li>
132<li><tt class="docutils literal"><span class="pre">&lt;name&gt;__gt:</span> <span class="pre">OpenLayers.Filter.Comparison.GREATER_THAN</span></tt></li>
133<li><tt class="docutils literal"><span class="pre">&lt;name&gt;__ge:</span> <span class="pre">OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO</span></tt></li>
134<li><tt class="docutils literal"><span class="pre">&lt;name&gt;__like:</span> <span class="pre">OpenLayers.Filter.Comparison.LIKE</span></tt></li>
135</ul>
136<p>In most cases your would not directly create <tt class="docutils literal"><span class="pre">GeoExt.form.SearchAction</span></tt>
137objects, but use <a title="GeoExt.form.FormPanel" class="reference external" href="FormPanel.html#GeoExt.form.FormPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.form.FormPanel</span></tt></a> instead.</p>
138</dd></dl>
139
140<div class="section" id="example-use">
141<h2>Example Use<a class="headerlink" href="#example-use" title="Permalink to this headline">¶</a></h2>
142<p>Sample code showing how to use a GeoExt SearchAction with an Ext form panel:</p>
143<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">Ext</span><span class="p">.</span><span class="nx">form</span><span class="p">.</span><span class="nx">Panel</span><span class="p">({</span>
144    <span class="nx">renderTo</span><span class="o">:</span> <span class="s2">&quot;formpanel&quot;</span><span class="p">,</span>
145    <span class="nx">items</span><span class="o">:</span> <span class="p">[{</span>
146        <span class="nx">xtype</span><span class="o">:</span> <span class="s2">&quot;textfield&quot;</span><span class="p">,</span>
147        <span class="nx">name</span><span class="o">:</span> <span class="s2">&quot;name__like&quot;</span><span class="p">,</span>
148        <span class="nx">value</span><span class="o">:</span> <span class="s2">&quot;mont&quot;</span>
149    <span class="p">},</span> <span class="p">{</span>
150        <span class="nx">xtype</span><span class="o">:</span> <span class="s2">&quot;textfield&quot;</span><span class="p">,</span>
151        <span class="nx">name</span><span class="o">:</span> <span class="s2">&quot;elevation__ge&quot;</span><span class="p">,</span>
152        <span class="nx">value</span><span class="o">:</span> <span class="s2">&quot;2000&quot;</span>
153    <span class="p">}]</span>
154<span class="p">});</span>
155
156<span class="kd">var</span> <span class="nx">searchAction</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">SearchAction</span><span class="p">(</span><span class="nx">formPanel</span><span class="p">.</span><span class="nx">getForm</span><span class="p">(),</span> <span class="p">{</span>
157    <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>
158        <span class="nx">url</span><span class="o">:</span> <span class="s2">&quot;http://publicus.opengeo.org/geoserver/wfs&quot;</span><span class="p">,</span>
159        <span class="nx">featureType</span><span class="o">:</span> <span class="s2">&quot;tasmania_roads&quot;</span><span class="p">,</span>
160        <span class="nx">featureNS</span><span class="o">:</span> <span class="s2">&quot;http://www.openplans.org/topp&quot;</span>
161    <span class="p">}),</span>
162    <span class="nx">abortPrevious</span><span class="o">:</span> <span class="kc">true</span>
163<span class="p">});</span>
164
165<span class="nx">formPanel</span><span class="p">.</span><span class="nx">getForm</span><span class="p">().</span><span class="nx">doAction</span><span class="p">(</span><span class="nx">searchAction</span><span class="p">,</span> <span class="p">{</span>
166    <span class="nx">callback</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span>
167        <span class="c1">// response.features includes the features read</span>
168        <span class="c1">// from the server through the protocol</span>
169    <span class="p">}</span>
170<span class="p">});</span>
171</pre></div>
172</div>
173</div>
174<div class="section" id="public-properties">
175<h2>Public Properties<a class="headerlink" href="#public-properties" title="Permalink to this headline">¶</a></h2>
176<p>Public properties in addition to those
177listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.Action">Ext.form.Action</a>.</p>
178<dl class="attribute">
179<dt id="GeoExt.form.SearchAction.response">
180<tt class="descclassname">SearchAction.</tt><tt class="descname">response</tt><a class="headerlink" href="#GeoExt.form.SearchAction.response" title="Permalink to this definition">¶</a></dt>
181<dd><tt class="docutils literal"><span class="pre">OpenLayers.Protocol.Response</span></tt> A reference to the response
182resulting from the search request. Read-only.</dd></dl>
183
184</div>
185</div>
186
187
188          </div>
189        </div>
190      </div>
191      <div class="clearer"></div>
192    </div>
193    <div class="related">
194      <h3>Navigation</h3>
195      <ul>
196            <li class="right" style="margin-right: 10px">
197              <a href="../../../../genindex.html" title="General Index"
198                 accesskey="I">index</a></li>
199            <li class="right" >
200              <a href="../../../../modindex.html" title="Global Module Index"
201                 accesskey="M">modules</a> |</li>
202            <li class="right" >
203              <a href="../grid/FeatureSelectionModel.html" title="GeoExt.grid.FeatureSelectionModel"
204                 accesskey="N">next</a> |</li>
205            <li class="right" >
206              <a href="FormPanel.html" title="GeoExt.form.FormPanel"
207                 accesskey="P">previous</a> |</li>
208        <li><a href="../../../../index.html">GeoExt</a> &raquo;</li>
209          <li><a href="../../../index.html" >API Reference</a> &raquo;</li>
210          <li><a href="../../widgets.html" >Widgets</a> &raquo;</li>
211        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.form.SearchAction</span></tt></a></li>
212      </ul>
213    </div>
214
215    <div class="footer">
216      &copy; Copyright 2009-2010, GeoExt Community.
217    </div>
218  </body>
219</html>
Note: See TracBrowser for help on using the repository browser.