diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
commit | e44a7e37b6c7b5961adaffc62b9042b8d442938e (patch) | |
tree | 95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojox/grid/tests/test_dojo_data_model_processError.html | |
parent | a62b9742ee5e28bcec6872d88f50f25b820914f6 (diff) | |
download | semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2 |
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/grid/tests/test_dojo_data_model_processError.html')
-rw-r--r-- | includes/js/dojox/grid/tests/test_dojo_data_model_processError.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/includes/js/dojox/grid/tests/test_dojo_data_model_processError.html b/includes/js/dojox/grid/tests/test_dojo_data_model_processError.html new file mode 100644 index 0000000..4130043 --- /dev/null +++ b/includes/js/dojox/grid/tests/test_dojo_data_model_processError.html @@ -0,0 +1,65 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> + <title>dojox.Grid with Dojo.Data model with trapping of data store errors.</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> + <style type="text/css"> + @import "../../../dijit/themes/tundra/tundra.css"; + @import "../../../dojo/resources/dojo.css"; + @import "../../../dijit/tests/css/dijitTests.css"; + @import "../_grid/tundraGrid.css"; + + #grid{ + width: 65em; + height: 25em; + padding: 1px; + } + </style> + <script type="text/javascript" src="../../../dojo/dojo.js" + djConfig="isDebug: true, debugAtAllCosts: false, parseOnLoad: true"></script> + <script type="text/javascript"> + dojo.require("dojox.grid.Grid"); + dojo.require("dojox.data.CsvStore"); + dojo.require("dojo.parser"); + </script> + + <script type="text/javascript"> + var layoutMovies = [ + { cells: [[ + { name: "Title", field: "Title", width: 'auto' }, + { name: "Year", field: "Year", width: 5 }, + { name: "Producer", field: "Producer", width: 20 } + ]]} + ]; + + </script> +</head> +<body class="tundra"> + <h1>dojox.Grid using Dojo.Data stores via simple binding</h1> + + <h2>dojox.data.CsvStore:</h2>. + <i>This grid does not load data. The data store references a non-existent URL on purpose. It should trigger a failure that we catch and display in an alert</i> + <span dojoType="dojox.data.CsvStore" + jsId="csvStore" url="support/NoSuchMovieFile.csv"> + </span> + <span dojoType="dojox.grid.data.DojoData" + jsId="dataModel" + store="csvStore" + rowsPerPage="5" + query="{ Title: '*' }" + clientSort="true"> + <!-- + This uses the dojo/connect API to link to the processError handler of the model. + It allows a declarative way to hook to the handler on the model. + --> + <script type="dojo/connect" event="processError" args="error, request"> + alert("Error was encountered when store was queried: " + dojo.toJson(error, true)); + </script> + </span> + <div id="grid" dojoType="dojox.Grid" elasticView="2" + model="dataModel" structure="layoutMovies"> + </div> +</body> +</html> + + |