Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <title>RESTful Store Example</title>
  5. <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
  6. <!-- GC -->
  7. <!-- LIBS -->
  8. <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
  9. <!-- ENDLIBS -->
  10. <script type="text/javascript" src="../../ext-all.js"></script>
  11. <script type="text/javascript" src="../shared/extjs/App.js"></script>
  12. <script type="text/javascript" src="restful.js"></script>
  13. <script type="text/javascript" src="../ux/RowEditor.js"></script>
  14. <link rel="stylesheet" type="text/css" href="restful.css" />
  15. <link rel="stylesheet" href="../ux/css/RowEditor.css" />
  16. <!-- Common Styles for the examples -->
  17. <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
  18. <link rel="stylesheet" type="text/css" href="../shared/icons/silk.css" />
  19. </head>
  20. <body>
  21. <script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->
  22. <h1>RESTful Store Example</h1>
  23. <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>
  24. and plugging a suitable <strong>Ext.data.DataWriter</strong> into your Store. This example uses <strong>Ext.data.JsonWriter</strong>.</p>
  25. <p>Note that the js is not minified so it is readable. See <a href="restful.js">restful.js</a></p>
  26. <p>Take note of the requests being generated in Firebug as you interact with the Grid.</p>
  27. <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
  28. 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>
  29. <code><pre>
  30. var proxy = new Ext.data.HttpProxy({
  31. url: 'app.php/users'
  32. });
  33. </pre></code>
  34. <div class="container" style="width:500px">
  35. <div id="user-grid"></div>
  36. </div>
  37. </body>
  38. </html>