asset manager initial check in

This commit is contained in:
JT Smith 2004-12-17 05:38:46 +00:00
parent 4bc4974ecc
commit f7dd3b0577
320 changed files with 15398 additions and 0 deletions

View file

@ -0,0 +1,75 @@
<html>
<head>
<title>ActiveWidgets Tutorial</title>
<link href="../../../common/site.css" type="text/css" rel="stylesheet" />
<script src="../../../common/site.js"></script>
</head>
<body class="tutorial">
<script>document.write(window.$header)</script>
<div class="image-home">
</div>
<div class="location">:: Documentation &gt;&gt; Tutorial &gt;&gt; Grid &gt;&gt;
</div>
<h1>
Loading data from a text file.
</h1>
<p>
When the data is available in a plain text file (tabs or comma-delimited)
you can load it into the grid without any server-side processing at all.
</p>
<p>
The file may look like this:
</p>
<iframe src="companies.txt" style="HEIGHT:200px"></iframe>
<p>
The first step is to create an external data model object,
which will load the data and provide a necessary interface
for the grid to access it.
</p>
<pre>var table = new Active.Text.Table;</pre>
<p>
The data model should know the URL of the file.
</p>
<pre>table.setProperty("URL", "companies.txt");</pre>
<p>
And you should ask the model to start loading the file.
</p>
<pre>table.request();</pre>
<p>
After the grid object is created
</p>
<pre>var obj = new Active.Controls.Grid;
obj.setProperty("column/count", 5);</pre>
<p>
it is assigned our new external data model.
</p>
<pre>obj.setModel("data", table);</pre>
<p>
Don't forget to write the grid HTML to the page as usual.
</p>
<pre>document.write(obj);</pre>
<p>
Full script:
</p>
<textarea id="grid1" wrap="off" style="HEIGHT:200px" target="height:300px">
var table = new Active.Text.Table;
table.setProperty("URL", "companies.txt");
table.request();
var obj = new Active.Controls.Grid;
obj.setProperty("column/count", 5);
obj.setModel("data", table);
document.write(obj);
</textarea>
<script>if(window.site) site.example("grid1");</script>
<script>document.write(window.$column)</script>
<script>document.write(window.$tutorial)</script>
<script>document.write(window.$footer)</script>
</body>
</html>