summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--loadingdemo-controller.lua9
-rw-r--r--loadingdemo-read-html.lsp10
2 files changed, 17 insertions, 2 deletions
diff --git a/loadingdemo-controller.lua b/loadingdemo-controller.lua
index d259d2c..817196a 100644
--- a/loadingdemo-controller.lua
+++ b/loadingdemo-controller.lua
@@ -5,6 +5,13 @@ default_action = "read"
function read(self)
local versioncontroller = self:new("alpine-baselayout/alpineversion")
local versionresult = versioncontroller:read()
+
+ -- Here's how you call the model directly
+ local modelresult = versioncontroller.model:get()
+
versioncontroller:destroy()
- return cfe({ value="I called alpineversion:read(), and you are running version "..versionresult.value, label="Alpine version" })
+
+ return cfe({ controller="I called alpineversion:read(), and you are running version "..versionresult.value,
+ model="The model call to get() returned " .. modelresult.value
+ })
end
diff --git a/loadingdemo-read-html.lsp b/loadingdemo-read-html.lsp
index 168a2c1..4890b40 100644
--- a/loadingdemo-read-html.lsp
+++ b/loadingdemo-read-html.lsp
@@ -2,4 +2,12 @@
<H1>Example of Loading Another Controller</H1>
I am <?= page_info.controller ?> / <?= page_info.action ?><br>
-<?= data.value ?>
+
+<h2>SubController Result</h2>
+
+<?= data.controller ?>
+
+<h2>SubController - MODEL - Result</h2>
+
+
+<?= data.model ?>