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/lib/GeoExt/widgets/form/BasicForm.js @ 76

Revision 76, 2.6 KB checked in by djay, 12 years ago (diff)

Ajout du répertoire web

  • Property svn:executable set to *
Line 
1/**
2 * Copyright (c) 2008-2010 The Open Source Geospatial Foundation
3 *
4 * Published under the BSD license.
5 * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
6 * of the license.
7 */
8
9/**
10 * @include GeoExt/widgets/form/SearchAction.js
11 */
12
13/** api: (define)
14 *  module = GeoExt.form
15 *  class = BasicForm
16 *  base_link = `Ext.form.BasicForm <http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.BasicForm>`_
17 */
18
19Ext.namespace("GeoExt.form");
20
21/** api: constructor
22 *  .. class:: BasicForm(config)
23 *
24 *      A specific ``Ext.form.BasicForm`` whose doAction method creates
25 *      a :class:`GeoExt.form.SearchAction` if it is passed the string
26 *      "search" as its first argument.
27 *
28 *      In most cases one would not use this class directly, but
29 *      :class:`GeoExt.form.FormPanel` instead.
30 */
31GeoExt.form.BasicForm = Ext.extend(Ext.form.BasicForm, {
32    /** private: property[protocol]
33     *  ``OpenLayers.Protocol`` The protocol configured in this
34     *  instance.
35     */
36    protocol: null,
37
38    /**
39     * private: property[prevResponse]
40     * ``OpenLayers.Protocol.Response`` The response return by a call to
41     *  protocol.read method.
42     */
43    prevResponse: null,
44
45    /**
46     * api: config[autoAbort]
47     * ``Boolean`` Tells if pending requests should be aborted
48     *      when a new action is performed.
49     */
50    autoAbort: true,
51
52    /** api: method[doAction]
53     *  :param action: ``String or Ext.form.Action`` Either the name
54     *      of the action or a ``Ext.form.Action`` instance.
55     *  :param options: ``Object`` The options passed to the Action
56     *      constructor.
57     *  :return: :class:`GeoExt.form.BasicForm` This form.
58     *
59     *  Performs the action, if the string "search" is passed as the
60     *  first argument then a :class:`GeoExt.form.SearchAction` is created.
61     */
62    doAction: function(action, options) {
63        if(action == "search") {
64            options = Ext.applyIf(options || {}, {
65                protocol: this.protocol,
66                abortPrevious: this.autoAbort
67            });
68            action = new GeoExt.form.SearchAction(this, options);
69        }
70        return GeoExt.form.BasicForm.superclass.doAction.call(
71            this, action, options
72        );
73    },
74
75    /** api: method[search]
76     *  :param options: ``Object`` The options passed to the Action
77     *      constructor.
78     *  :return: :class:`GeoExt.form.BasicForm` This form.
79     * 
80     *  Shortcut to do a search action.
81     */
82    search: function(options) {
83        return this.doAction("search", options);
84    }
85});
Note: See TracBrowser for help on using the repository browser.