r9584 - helma-ng/trunk/apps/demo/skins

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090408112431.1561F3D0D6@mia>
Author: hannes
Date: 2009-04-08 13:24:30 +0200 (Wed, 08 Apr 2009)
New Revision: 9584

Modified:
   helma-ng/trunk/apps/demo/skins/logging.html
   helma-ng/trunk/apps/demo/skins/modules.html
   helma-ng/trunk/apps/demo/skins/skins.html
Log:
Update code in demo skins to reflect actual current code.

Details at http://dev.helma.org/trac/helma/changeset/9584

Modified: helma-ng/trunk/apps/demo/skins/logging.html
===================================================================
--- helma-ng/trunk/apps/demo/skins/logging.html	2009-04-07 18:18:41 UTC (rev 9583)
+++ helma-ng/trunk/apps/demo/skins/logging.html	2009-04-08 11:24:30 UTC (rev 9584)
@@ -15,9 +15,9 @@
 
 <pre class="code">
 function logging(req, res) {
-    if (req.data.info) {
+    if (req.params.info) {
         log.info("Hello world!");
-    } else if (req.data.error) {
+    } else if (req.params.error) {
         try {
             foo.bar.moo;
         } catch (e) {

Modified: helma-ng/trunk/apps/demo/skins/modules.html
===================================================================
--- helma-ng/trunk/apps/demo/skins/modules.html	2009-04-07 18:18:41 UTC (rev 9583)
+++ helma-ng/trunk/apps/demo/skins/modules.html	2009-04-08 11:24:30 UTC (rev 9584)
@@ -5,12 +5,13 @@
 
 <h3><a href="<% href %>"><% href %></a></h3>
 
-<p>This module was mounted in the app's main module using the following statement:</p>
+<p>This module was mounted in the app's config.js file:</p>
 
-<pre class="code">importModule('webmodule', 'mount.point');</pre>
+<pre class="code">exports.urls = [
+    [ /^mount\/point/, 'webmodule' ]
+];</pre>
 
 <p>Modules are the <a href="http://dev.helma.org/ng/Modules+and+Scopes/">basic building blocks</a>
-of Helma NG, and they can also be used as web components. Just use importModule() to import a web app or module
-to where you want it and its actions become accessible from the web.</p>
+of Helma NG, and they can also be used as web components.</p>
 
 <p><a href="/">Go back</a> to the main page.
\ No newline at end of file

Modified: helma-ng/trunk/apps/demo/skins/skins.html
===================================================================
--- helma-ng/trunk/apps/demo/skins/skins.html	2009-04-07 18:18:41 UTC (rev 9583)
+++ helma-ng/trunk/apps/demo/skins/skins.html	2009-04-08 11:24:30 UTC (rev 9584)
@@ -5,12 +5,12 @@
 
 <p>This is the action code that renders the skin:</p>
 
-<pre class="code">function skins_action() {
-    var context = {
+<pre class="code">function skins(req, res) {
+    res.render('skins/skins.html', {
+        title: 'Skin Demo',
         name: 'Luisa',
         names: ['Benni', 'Emma', 'Luca', 'Selma']
-    };
-    res.write(render('skins/skins.html', context));
+    });
 }</pre>
 
 <p>And the following subskin in skins.html:</p>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.