Learning Dojo -- 2. A quick tour
1. Three steps for installing Dojo
<style type="text/css"> @import "/dojoroot/dijit/themes/tundra/tundra.css"; @import "/dojoroot/dojo/resources/dojo.css";</style><script type="text/javascript" src="/dojoroot/dojo/dojo.js" djConfig="parseOnLoad: true,isDebug:true"></script>
<body name="code"><script> dojo.require("dojo.parser"); <!-- similar with "import java.util.List" --></script>
dojo.xhrGet({ // URL for our proxy that calls the rating service url: "services/someurl.xml", content: { query: "someparamer"}, timeout: 10000, // Set this to parse response into XML handleAs: "xml", // Function run when web service returns with the answer load: function(response) { ... }, error: commonError });
<div dojoType="dojo.data.ItemFileReadStore" jsId="wishStore" url="services/cigar_wish_list.json"> </div> <table id="grid" dojoType="dojox.grid.Grid" store="wishStore" query="{ wishId: '*' }" clientSort="true"> <thead> <tr> <th field="description" width="15em">Cigar</th> <th field="size">Length/Ring</th> <th field="origin">Origin</th> <th field="wrapper">Wrapper</th> <th field="shape">Shape</th> </tr> </thead> </table>