cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: [Proposal] Implementing XMLForm with Flow
Date Mon, 23 Dec 2002 17:22:28 GMT
Christopher Oliver wrote:

> Try this:
> 
> function checkLogin(funarg) {
>      if (user == null) {
>           login();
>           this[funarg]();
>      }
> }

Thanks, it worked! While you're at it, would it be possible to pass 
arguments to "funarg", by defining them in the sitemap? I mean:

         <map:call function="checkLogin">
           <map:parameter name="funarg" value="protected"/>
           <map:parameter name="arg1" value="somevalue"/>
           <map:parameter name="arg2" value="someothervalue"/>
         </map:call>

  function checkLogin(funarg, ???) {
       if (user == null) {
            login();
            this[funarg](???);
       }
  }

What should I put in place of the question marks? Assume that the number 
of arguments is variable. Pardon my Javascript ignorance and thanks 
again ;-).

	Ugo

-- 
Ugo Cei - http://www.beblogging.com/blog/


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message