]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | <!DOCTYPE html>\r |
2 | <html>\r | |
3 | <head>\r | |
4 | <meta http-equiv="X-UA-Compatible" content="IE=edge">\r | |
5 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r | |
6 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">\r | |
7 | <title>Writer Example</title>\r | |
8 | <link rel="stylesheet" type="text/css" href="../shared/examples.css" />\r | |
9 | <link rel="stylesheet" type="text/css" href="writer.css" />\r | |
10 | \r | |
11 | <!-- GC -->\r | |
12 | \r | |
13 | <script type="text/javascript" src="../shared/include-ext.js"></script>\r | |
14 | <script type="text/javascript" src="../shared/options-toolbar.js"></script>\r | |
15 | <script type="text/javascript" src="../shared/examples.js"></script>\r | |
16 | \r | |
17 | <script type="text/javascript" src="writer.js"></script>\r | |
18 | </head>\r | |
19 | <body>\r | |
20 | <h1>Ext.data.writer.Writer Example</h1>\r | |
21 | <p>This example shows how to implement a Writer for your Store. A Writer-enabled Store frees you from having to manually compose Ajax requests\r | |
22 | to perform CRUD actions on a Store.</p>\r | |
23 | <p>Note that the js is not minified so it is readable. See <a href="writer.js">writer.js</a>.\r | |
24 | \r | |
25 | <p>The AjaxProxy plugged into the store in this example uses the <em>api</em> configuration instead of an <em>url</em>.\r | |
26 | A simple MVC-like php backend has been created for this example which simulates a database by storing records in $_SESSION. See the file /remote/app/controllers/users.php. You may have to configure\r | |
27 | your web-server to allow scripts to be executed in the /examples directory.</p>\r | |
28 | \r | |
29 | <p>Take note of the requests being generated in Firebug as you interact with the Grid and Form.</p>\r | |
30 | \r | |
31 | <p>An <b>Error has been simulated</b> on the server-side: Attempting to update a record having <b>ODD</b>-numbered id will generate this error.\r | |
32 | Responses from the update action will have successProperty === false along with a message. This error can be handled by\r | |
33 | listening to the <b>"exception"</b> event upon your proxy.</p>\r | |
34 | \r | |
35 | </body>\r | |
36 | </html>\r |