You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/07/14 12:05:29 UTC

Authentication - flow errors?

I am getting a strange error trying to run flowscript
in an authenticated match.

I have the flowscript, newpage.js

function userInfo() {
 cocoon.sendPage("new_form");
}

function myInfo() {
 cocoon.sendPage("anew_form");
}

In the sitemap I have:

     <map:match pattern="anew_form">
         <map:generate  type="jx" src="docs/testfile.jx"/>
         <map:serialize type="xml"/>
     </map:match>   
   
     <map:match pattern="myInfo">     
         <map:call function="myInfo"/>      
     </map:match>   

which works fine when I call the match "anew_form".

However, once the user has logged in,
when I call the match "new_form".

     <map:match pattern="userInfo">
       <map:act type="auth-protect">
         <map:parameter name="handler" value="demohandler"/>       
         <map:call function="userInfo"/>
      </map:act>
      <map:redirect-to uri="login"/>           
     </map:match>        
      
     <map:match pattern="new_form">
       <map:act type="auth-protect">
         <map:parameter name="handler" value="demohandler"/>   
         <map:generate  type="jx" src="docs/testfile.jx"/>
         <map:serialize type="xml"/>
      </map:act>
      <map:redirect-to uri="login"/>           
     </map:match>  

The file is *not* generated, and I get this error instead:

org.mozilla.javascript.UniqueTag@1dc2ee1: NOT_FOUND is not a function.
(file:/d:/tomcat/webapps/cocoon215/myapp/flow/newpage.js; line 11)

where line 11 is
  cocoon.sendPage("new_form");

What is causing this error and how do I prevent it?

Thanks
Derek

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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