cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <>
Subject how do I specify function parameters in the URL
Date Tue, 03 Jan 2012 14:19:06 GMT
Hi there,

I know that I can call a function with parameters using the sitemap as 
for ex.:

         <map:flow language="javascript">
            <map:script src="myApplication.js"/>
               <map:match pattern="index.html">
                  <map:call function="showIndexPage">
                    <map:parameter name="paramName" value="Value"/>


Then in myApplication.js you would define a JavaScript function called 
showIndexPage() such as:

function showIndexPage() { var param = cocoon.parameters.paramName; 
sendPage("private/index.html", {param: param}); }

But how would I use this to call a function whose arguments are in the 
calling URL.

Ex. say I wanted to login any user where the user's name is specified in 
the URLhow could I do this?  For example if I wanted to call a function 
using the user's login name that I specify in the URL (say the user is 
jsmith), and I used a URL as below, how would I pass on jsmith on to the 

Ex.: http://myserver:8080/myApp/login/jsmith


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message