From 7fa1200b5e589a47884aa4d62630ce9099fccee1 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 30 Jan 2007 11:36:13 +0000 Subject: Add basic Scaffold view for Active Record --- demos/quickstart/protected/controls/TopicList.tpl | 1 + .../pages/Database/Samples/Scaffold/Home.page | 7 ++ .../pages/Database/Samples/Scaffold/Home.php | 33 +++++++ .../pages/Database/Samples/Scaffold/sqlite.db | Bin 0 -> 4096 bytes .../protected/pages/Database/Samples/config.xml | 5 ++ .../protected/pages/Database/Scaffold.page | 99 +++++++++++++++++++++ 6 files changed, 145 insertions(+) create mode 100644 demos/quickstart/protected/pages/Database/Samples/Scaffold/Home.page create mode 100644 demos/quickstart/protected/pages/Database/Samples/Scaffold/Home.php create mode 100644 demos/quickstart/protected/pages/Database/Samples/Scaffold/sqlite.db create mode 100644 demos/quickstart/protected/pages/Database/Samples/config.xml create mode 100644 demos/quickstart/protected/pages/Database/Scaffold.page (limited to 'demos/quickstart') diff --git a/demos/quickstart/protected/controls/TopicList.tpl b/demos/quickstart/protected/controls/TopicList.tpl index 698cbeea..8d68c2e2 100644 --- a/demos/quickstart/protected/controls/TopicList.tpl +++ b/demos/quickstart/protected/controls/TopicList.tpl @@ -72,6 +72,7 @@
diff --git a/demos/quickstart/protected/pages/Database/Samples/Scaffold/Home.page b/demos/quickstart/protected/pages/Database/Samples/Scaffold/Home.page new file mode 100644 index 00000000..21f508f7 --- /dev/null +++ b/demos/quickstart/protected/pages/Database/Samples/Scaffold/Home.page @@ -0,0 +1,7 @@ +Active Record classes can be used together with
+
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 +TDataGrid. The scaffold views provide +the following builtin functionality: +
+ +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.
+ +To use the scaffold view, we first define an Active Record +class that represents a table or view in the database. Consider the following +Active Record class that corresponds to the users +table as defined in the Active Record quickstart page. +
+ +The scaffold view classes are in the System.Data.ActiveRecord.Scaffold.*
+namespace.
+This namespace can be "imported" in the
+Application Configuration
+using the application.xml file or through the php code using the Prado::using()
+method. The simplest way to provide CRUD functional is to use the
+
Other views... list view
+ +edit view...
+Combining list + edit views
+ +custom list view...
+To be completed...
+ +Address book example...
+ +