|
Dojo Tutorial |
|
</head>
<body class=”tundra”>
<p id=”backgroundArea”
dojoType=”dijit.form.InlineEditBox” >
<input name=”date” value=”2005-12-30"
dojoType=”dijit.form.DateTextBox”
constraints={datePattern:’MM/dd/
yy’}
lang=”en-us”
required=”true”
promptMessage=”mm/dd/yy”
invalidMessage=”Invalid date. Please
use mm/dd/yy format.”>
</body>
</html>
Output of the program:
12/30/05
When you click the following date then you get
the following and select any date and it
automatically save:
Dojo Tree
In this section, you will learn about the tree
and how to create a tree in dojo.
Tree : The tree is a GUI that helps to lists the
hierarchical lists. The tree widget is a simple |
|
but the real power comes in the data. It
represents the hierarchical structure of tree.
Data is fed by the powerful dojo.data API.
There are following steps for creating Dojo
trees :
• Create a rooted or rootless trees
(forests)
• Nest, each branch is independently
expandible
• Different icons for different leaf or
branch classes
• Tree data are stored in any dojo.data
implementing API.
• Events fire when users clicked on it.
• Add, remove or disable nodes of tree.
Here is the code of Program:
<html>
<title>Tree</title>
<head>
<style type=”text/css”>
@import “../resources/dojo.css”;
@import “../dijit/themes/tundra/
tundra.css”;
</style>
<script type=”text/javascript”
src=”dojo.xd.js” djConfig=”parseOnLoad:
true”></script>
<script>
dojo.require(“dojo.data.ItemFileReadStore”);
dojo.require(“dijit.Tree”);
dojo.require(“dojo.parser”);
</script>
</head>
<body class=”tundra”>
Simple Tree:<br><br>
<div
dojoType=”dojo.data.ItemFileReadStore”
url=”tree.txt” jsid=”popStore” />
<div dojoType=”dijit.Tree”
store=”popStore” labelAttr=”sname”
label=”Tree”></div>
</body>
</html>
|
|
March 2008 | Java Jazz Up | 43 |
|
|
|
View All Topics |
All Pages of this Issue |
Pages:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53 ,
54,
55,
56,
57,
58,
59,
Download PDF |
|
|
|
|
|
|
|
|
|