summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Database/Scaffold.page
diff options
context:
space:
mode:
authorwei <>2007-05-07 04:17:37 +0000
committerwei <>2007-05-07 04:17:37 +0000
commiteab6bb13b9efb3e1c6d725368368de4d74b00946 (patch)
tree57aa3462b6f18ad190527483e753dc148971bc63 /demos/quickstart/protected/pages/Database/Scaffold.page
parente91ac8550a4e6dfa255874860f108935841c16f6 (diff)
Update Active Record docs.
Diffstat (limited to 'demos/quickstart/protected/pages/Database/Scaffold.page')
-rw-r--r--demos/quickstart/protected/pages/Database/Scaffold.page46
1 files changed, 23 insertions, 23 deletions
diff --git a/demos/quickstart/protected/pages/Database/Scaffold.page b/demos/quickstart/protected/pages/Database/Scaffold.page
index 9afe4a3f..759e55d1 100644
--- a/demos/quickstart/protected/pages/Database/Scaffold.page
+++ b/demos/quickstart/protected/pages/Database/Scaffold.page
@@ -1,8 +1,8 @@
<com:TContent ID="body" >
<!-- $Id$ -->
-<h1>Active Record Scaffold Views</h1>
+<h1 id="144022">Active Record Scaffold Views</h1>
<com:SinceVersion Version="3.1b" />
-<p><a href="?page=Database.ActiveRecord">Active Record</a> classes can be used together with
+<p id="720048" class="block-content"><a href="?page=Database.ActiveRecord">Active Record</a> classes can be used together with
<com:DocLink ClassPath="System.Data.ActiveRecord.Scaffold.TScaffoldListView" Text="TScaffoldListView"/>
and
<com:DocLink ClassPath="System.Data.ActiveRecord.Scaffold.TScaffoldEditView" Text="TScaffoldEditView"/>
@@ -10,7 +10,7 @@ and
links both <tt>TScaffoldListView</tt> and <tt>TScaffoldEditView</tt>) to create
<i>simple</i> Create/Read/Update/Delete (CRUD) web applications.</p>
-<p>The scaffold views are intended to assist in prototyping web application,
+<p id="720049" class="block-content">The scaffold views are intended to assist in prototyping web application,
they are not designed to be as customiziable as more complex components such as
<a href="?page=Controls.DataGrid">TDataGrid</a>. The scaffold views provide
the following builtin functionality:
@@ -27,18 +27,18 @@ the following builtin functionality:
<li>Presents specialized controls such as date pickers.</li>
</ul>
-<p>Scaffold views are dependent on Active Records and currently supports
+<p id="720050" class="block-content">Scaffold views are dependent on Active Records and currently supports
the following databases: Mysql, Sqlite and Postgres SQL. Support for other databases
can be considered when there are sufficient demand.</p>
-<h2>Setting up a Scaffold View</h2>
-<p>To use the scaffold view, we first define an <a href="?page=Database.ActiveRecord">Active Record</a>
+<h2 id="144023">Setting up a Scaffold View</h2>
+<p id="720051" class="block-content">To use the scaffold view, we first define an <a href="?page=Database.ActiveRecord">Active Record</a>
class that represents a table or view in the database. Consider the following
Active Record class that corresponds to the <tt>users</tt>
table as defined in the <a href="?page=Database.ActiveRecord">Active Record</a> quickstart page.
</p>
-<com:TTextHighlighter Language="php" CssClass="source">
+<com:TTextHighlighter Language="php" CssClass="source block-content" id="code_720188">
class UserRecord extends TActiveRecord
{
const TABLE='users';
@@ -48,7 +48,7 @@ class UserRecord extends TActiveRecord
}
</com:TTextHighlighter>
-<p>The scaffold view classes are in the <tt>System.Data.ActiveRecord.Scaffold.*</tt>
+<p id="720052" class="block-content">The scaffold view classes are in the <tt>System.Data.ActiveRecord.Scaffold.*</tt>
<a href="?page=Fundamentals.Components#704">namespace</a>.
This <a href="?page=Fundamentals.Components#704">namespace</a> can be "imported" in the
<a href="?page=Configurations.AppConfig">Application Configuration</a>
@@ -59,11 +59,11 @@ simply set the <tt>RecordClass</tt> property value equal to an Active Record
class name.
</p>
-<com:TTextHighlighter Language="prado" CssClass="source">
+<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_720189">
&lt;com:TScaffoldView RecordClass="UserRecord" /&gt;
</com:TTextHighlighter>
-<p>The above code will list the current records in the <tt>users</tt> table.
+<p id="720053" class="block-content">The above code will list the current records in the <tt>users</tt> table.
Each record can be edited by clicking on the "edit" button and deleted by
clicking on the "delete" button. A new record can be added by clicking on the
"Add new record" button, enter some data (notice the automatic validation of required fields and data types), and click the "save" button.
@@ -71,20 +71,20 @@ Specifying search terms in the search textbox to find particular records. Finall
record list can be sorted for each column by changing the sorting column and order.
</p>
-<p>The <tt>TScaffoldView</tt> is a template control composed of other scaffold controls.
+<p id="720054" class="block-content">The <tt>TScaffoldView</tt> is a template control composed of other scaffold controls.
The following properties gives access to these composite controls.</p>
<ul>
<li><b><tt>ListView</tt></b> -- the <tt>TScaffoldListView</tt> displaying the record list. </li>
<li><b><tt>EditView</tt></b> -- the <tt>TScaffoldEditView</tt> that renders the inputs for editing and adding records.</li>
<li><b><tt>SearchControl</tt></b> -- the <tt>TScaffoldSearch</tt> responsible to the search user interface.</li>
</ul>
-<p>
+<p id="720055" class="block-content">
All these composite controls can be customized as we shall see below.
</p>
-<h2>TScaffoldListView</h2>
+<h2 id="144024">TScaffoldListView</h2>
-<p>A list of Active Records can be displayed using the <tt>TScaffoldListView</tt>
+<p id="720056" class="block-content">A list of Active Records can be displayed using the <tt>TScaffoldListView</tt>
with the following useful properties.</p>
<ul>
<li><b><tt>Header</tt></b> -- a <a href="?page=Controls.Repeater">TRepeater</a>
@@ -96,7 +96,7 @@ the links and/or buttons that navigate to different pages in the Active Record d
<li><b><tt>List</tt></b> -- a <a href="?page=Controls.Repeater">TRepeater</a> that renders a row of Active Record data.</li>
</ul>
-<p>Custom rendering of the each Active Record can be achieved by specifying
+<p id="720057" class="block-content">Custom rendering of the each Active Record can be achieved by specifying
the <tt>ItemTemplate</tt> and/or <tt>AlternatingItemTemplate</tt> property of the <tt>List</tt>
repeater.
The <tt>TScaffoldListView</tt> will listen for two command events named "delete" and
@@ -106,7 +106,7 @@ An "edit" command will push the record data to be edited by a
The following example lists the usernames only with bold formatting.
</p>
-<com:TTextHighlighter Language="prado" CssClass="source">
+<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_720190">
&lt;com:TScaffoldListView RecordClass="UserRecord" &gt;
&lt;prop:List.ItemTemplate&gt;
&lt;strong>&lt;%# $this->Data->username %>&lt;/strong&gt;
@@ -120,27 +120,27 @@ Thus, the subproperty <tt>ListView.List.ItemTemplate</tt> on <tt>TScaffoldView</
is equivalent to the <tt>List.ItemTemplate</tt> subproperty of <tt>TScaffoldListView</tt> in the above example.
</div>
-<p>The <tt>SearchCondition</tt> property and
+<p id="720058" class="block-content">The <tt>SearchCondition</tt> property and
<tt>SearchParameters</tt> property (takes array values) can be
specified to customize the records to be shown. The <tt>SearchCondition</tt>
will be used as the <tt>Condition</tt> property of <tt>TActiveRecordCriteria</tt>
and the <tt>SearchParameters</tt> property corresponds to
<tt>Parameters</tt> property of <tt>TActiveRecordCriteria</tt>.</p>
-<h2>TScaffoldEditView</h2>
-<com:TTextHighlighter Language="prado" CssClass="source">
+<h2 id="144025">TScaffoldEditView</h2>
+<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_720191">
&lt;com:TScaffoldEditView RecordPk="user1" RecordClass="UserRecord" /&gt;
</com:TTextHighlighter>
-<h2>Combining list + edit views</h2>
+<h2 id="144026">Combining list + edit views</h2>
-<com:TTextHighlighter Language="prado" CssClass="source">
+<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_720192">
&lt;com:TScaffoldEditView ID="edit_view" RecordClass="UserRecord" /&gt;
&lt;com:TScaffoldListView EditViewID="edit_view" RecordClass="UserRecord" /&gt;
</com:TTextHighlighter>
-<h2>Customizing the TScaffoldView</h2>
-<com:TTextHighlighter Language="prado" CssClass="source">
+<h2 id="144027">Customizing the TScaffoldView</h2>
+<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_720193">
&lt;com:TScaffoldView RecordClass="UserRecord" &gt;
&lt;prop:ListView.List.ItemTemplate&gt;
&lt;%# $this->DataItem->username %&gt;