Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / examples / restful / restful.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4 <title>RESTful Store Example</title>
5
6 <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
7
8     <!-- GC -->
9      <!-- LIBS -->
10      <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
11      <!-- ENDLIBS -->
12
13     <script type="text/javascript" src="../../ext-all.js"></script>
14     <script type="text/javascript" src="../shared/extjs/App.js"></script>
15     <script type="text/javascript" src="restful.js"></script>
16     <script type="text/javascript" src="../ux/RowEditor.js"></script>
17
18     <link rel="stylesheet" type="text/css" href="restful.css" />
19     <link rel="stylesheet" href="../ux/css/RowEditor.css" />
20
21     <!-- Common Styles for the examples -->
22     <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
23     <link rel="stylesheet" type="text/css" href="../shared/icons/silk.css" />
24 </head>
25 <body>
26 <script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
27 <h1>RESTful Store Example</h1>
28 <p>This example shows how to implement a RESTful Store.  A Store is made RESTful by simply setting the new configuration-property <strong><i>restful: true</i></strong>
29 and plugging a suitable <strong>Ext.data.DataWriter</strong> into your Store.  This example uses <strong>Ext.data.JsonWriter</strong>.</p>
30
31 <p>Note that the js is not minified so it is readable. See <a href="restful.js">restful.js</a></p>
32
33 <p>Take note of the requests being generated in Firebug as you interact with the Grid.</p>
34
35 <p>The HttpProxy in this example points to a single url <strong>app.php/users</strong>.  You may have to edit your web-server's configuration to allow the
36 php back-end to be executable.  app.php implements a simple RESTful backend controller and simulates a database by storing records in the $_SESSION.</p>
37 <code><pre>
38 var proxy = new Ext.data.HttpProxy({
39     url: 'app.php/users'
40 });
41
42 </pre></code>
43 <div class="container" style="width:500px">
44     <div id="user-grid"></div>
45 </div>
46
47 </body>
48 </html>