r9540 - helma-ng/trunk/apps/demo

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090316141701.4C5D73D0D6@mia>
Author: hannes
Date: 2009-03-16 15:17:01 +0100 (Mon, 16 Mar 2009)
New Revision: 9540

Modified:
   helma-ng/trunk/apps/demo/actions.js
Log:
Only resolve extra path elements to extra arguments if action has matching arguments declaration - fix demo action.

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

Modified: helma-ng/trunk/apps/demo/actions.js
===================================================================
--- helma-ng/trunk/apps/demo/actions.js	2009-03-16 14:16:56 UTC (rev 9539)
+++ helma-ng/trunk/apps/demo/actions.js	2009-03-16 14:17:01 UTC (rev 9540)
@@ -13,11 +13,9 @@
 
 
 // additional path elements are passed to the action as arguments,
-// e.g. /extra.path/foo/bar
-function extra_path(req, res) {
-    for (var i = 2; i < arguments.length; i++) {
-        res.write(arguments[i], "<br/>");
-    }
+// e.g. /extra.path/2008/09
+function extra_path(req, res, year, month) {
+    res.write("Extra arguments: ", year, month);
 }
 
 // demo for skins, macros, filters
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.