summaryrefslogtreecommitdiffstats
path: root/loadingdemo-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-07-04 15:28:29 +0000
committerTed Trask <ttrask01@yahoo.com>2008-07-04 15:28:29 +0000
commitb69bd2531463dddd9ad0af32f589e594106a3b4f (patch)
tree2ec92a7258dc6796da3bb97887e4625a91fc7447 /loadingdemo-controller.lua
parent0ec64b27143691be06918b6f0cdd3e70bc98b2dd (diff)
downloadacf-sandbox-b69bd2531463dddd9ad0af32f589e594106a3b4f.tar.bz2
acf-sandbox-b69bd2531463dddd9ad0af32f589e594106a3b4f.tar.xz
Added loadingdemo, a sample of how to load and access another controller from within your controller.
git-svn-id: svn://svn.alpinelinux.org/acf/sandbox/trunk@1277 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'loadingdemo-controller.lua')
-rw-r--r--loadingdemo-controller.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/loadingdemo-controller.lua b/loadingdemo-controller.lua
new file mode 100644
index 0000000..d259d2c
--- /dev/null
+++ b/loadingdemo-controller.lua
@@ -0,0 +1,10 @@
+module(..., package.seeall)
+
+default_action = "read"
+
+function read(self)
+ local versioncontroller = self:new("alpine-baselayout/alpineversion")
+ local versionresult = versioncontroller:read()
+ versioncontroller:destroy()
+ return cfe({ value="I called alpineversion:read(), and you are running version "..versionresult.value, label="Alpine version" })
+end