home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / basescript.js < prev    next >
Encoding:
Text File  |  2004-07-12  |  1.2 KB  |  42 lines

  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. *     http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // the applied scripts are called in the order found at the basescript
  17. cocoon.apply( "aspects1.js" );
  18. cocoon.apply( "aspects2.js" );
  19.  
  20. function interceptionTest() {
  21.   var uri = "page/info";
  22.   cocoon.log.error ( "interceptionTest - baseScript" );
  23.   var x = callAnotherFunction();
  24.   cocoon.sendPageAndWait(uri, { });
  25. }
  26.  
  27. function callAnotherFunction() {
  28.   var x = 1;
  29.   cocoon.log.error ( "callAnotherFunction() - baseScript" );     
  30.   if( x == 2 ) {
  31.     return 72;
  32.   }
  33.   return 27;
  34. }
  35.  
  36. function testSendPageAndWait() { 
  37.   woody.send( "bla" );    
  38.   cocoon.sendPageAndWait("xxx",{});
  39.   cocoon.sendPageAndWait("yyy",{});
  40.   cocoon.sendPageAndWait( "zzz", {} );
  41. }
  42.