vgritsenko    2003/03/19 18:42:57

  Modified:    src/webapp/samples/flow sitemap.xmap
               src/webapp/samples/flow/examples/prefs prefs.js sitemap.xmap
  Log:
  Fix 'prefs' flow example
  
  Revision  Changes    Path
  1.4       +38 -44    cocoon-2.1/src/webapp/samples/flow/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/flow/sitemap.xmap,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sitemap.xmap      16 Mar 2003 01:50:38 -0000      1.3
  +++ sitemap.xmap      20 Mar 2003 02:42:57 -0000      1.4
  @@ -32,13 +32,10 @@
       </map:resource>
     </map:resources>
   
  -
     <map:pipelines>
   
  -    <!-- Schecoon documentation pipeline -->
  -
  +    <!-- Flow documentation pipeline -->
       <map:pipeline>
  -
         <map:match pattern="">
           <map:redirect-to uri="index.html"/>
         </map:match>
  @@ -81,51 +78,50 @@
           </map:call>
         </map:match>
   
  -   <map:match pattern="**resources/script.js">
  -     <map:read src="context://docs/stylesheets/script-cli.js"
  -            mime-type="application/javascript"/>
  -   </map:match>
  -
  -   <map:match pattern="**resources/**.js">
  -     <map:read src="context://docs/stylesheets/{2}.js"
  -            mime-type="application/javascript"/>
  -   </map:match>
  -
  -   <map:match pattern="**.css">
  -    <map:read src="context://docs/{1}.css" mime-type="text/css"/>
  -   </map:match>
  -
  -   <map:match pattern="**images/*.png">
  -    <map:read src="context://docs/images/{2}.png"
  -           mime-type="image/png"/>
  -   </map:match>
  -
  -   <map:match pattern="**images/*.jpg">
  -    <map:read src="context://docs/images/{2}.jpg"
  -           mime-type="image/jpeg"/>
  -   </map:match>
  -
  -   <map:match pattern="**images/*.gif">
  -    <map:read src="context://docs/images/{2}.gif"
  -           mime-type="image/gif"/>
  -   </map:match>
  -
  -   <map:match pattern="**graphics/**-*.jpg">
  -     <map:generate src="svg/{3}.xml"/>
  -     <map:transform src="svg/addlabel.xsl">
  -       <map:parameter name="use-request-parameters" value="true"/>
  -       <map:parameter name="label" value="{2}"/>
  -     </map:transform>
  -     <map:serialize type="svg2jpeg"/>
  -   </map:match>
  +      <map:match pattern="**resources/script.js">
  +        <map:read src="context://docs/stylesheets/script-cli.js"
  +                  mime-type="application/javascript"/>
  +      </map:match>
  +
  +      <map:match pattern="**resources/**.js">
  +        <map:read src="context://docs/stylesheets/{2}.js"
  +                  mime-type="application/javascript"/>
  +      </map:match>
  +
  +      <map:match pattern="**.css">
  +       <map:read src="context://docs/{1}.css" mime-type="text/css"/>
  +      </map:match>
  +
  +      <map:match pattern="**images/*.png">
  +       <map:read src="context://docs/images/{2}.png"
  +                 mime-type="image/png"/>
  +      </map:match>
   
  +      <map:match pattern="**images/*.jpg">
  +       <map:read src="context://docs/images/{2}.jpg"
  +                 mime-type="image/jpeg"/>
  +      </map:match>
  +
  +      <map:match pattern="**images/*.gif">
  +       <map:read src="context://docs/images/{2}.gif"
  +                 mime-type="image/gif"/>
  +      </map:match>
  +
  +      <map:match pattern="**graphics/**-*.jpg">
  +        <map:generate src="svg/{3}.xml"/>
  +        <map:transform src="svg/addlabel.xsl">
  +          <map:parameter name="use-request-parameters" value="true"/>
  +          <map:parameter name="label" value="{2}"/>
  +        </map:transform>
  +        <map:serialize type="svg2jpeg"/>
  +      </map:match>
       </map:pipeline>
   
        <!-- All examples are located under the examples/ directory, and
        are standalone samples, with their own sitemap. The following
        generic mount operation loads them on demand. -->
       <map:pipeline>
  -      <map:match pattern="examples/**/invalidContinuation">
  +      <map:match pattern="examples/**/invalidContinuation.xml">
           <map:call resource="show-page">
             <map:parameter name="filename" value="invalidContinuation"/>
             <map:parameter name="full-filename" value="invalidContinuation"/>
  @@ -139,7 +135,5 @@
         </map:match>
       </map:pipeline>
   
  -
     </map:pipelines>
  -
   </map:sitemap>
  
  
  
  1.2       +4 -4      cocoon-2.1/src/webapp/samples/flow/examples/prefs/prefs.js
  
  Index: prefs.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/flow/examples/prefs/prefs.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- prefs.js  9 Mar 2003 00:11:03 -0000       1.1
  +++ prefs.js  20 Mar 2003 02:42:57 -0000      1.2
  @@ -13,7 +13,7 @@
   
   // The global user registry, through which we add new users or access
   // existing ones.
  -var userRegistry = Packages.samples.flow.prefs.logic.UserRegistry.getUserRegistry();
  +var userRegistry = 
Packages.org.apache.cocoon.samples.flow.prefs.UserRegistry.getUserRegistry();
   
   var user;
   
  @@ -78,9 +78,9 @@
       // below. We ignore this problem in this example.
       var existingUser = userRegistry.isLoginNameTaken(login);
       if (!existingUser) {
  -      user = new Packages.samples.flow.prefs.logic.User(login, password,
  -                                                        firstName, lastName,
  -                                                        email);
  +      user = new Packages.org.apache.cocoon.samples.flow.prefs.User(login, password,
  +                                                                    firstName, 
lastName,
  +                                                                    email);
         userRegistry.addUser(user);
         break;
       }
  
  
  
  1.2       +7 -6      cocoon-2.1/src/webapp/samples/flow/examples/prefs/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/flow/examples/prefs/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap      9 Mar 2003 00:11:03 -0000       1.1
  +++ sitemap.xmap      20 Mar 2003 02:42:57 -0000      1.2
  @@ -1,5 +1,7 @@
   <?xml version="1.0"?>
   
  +<!-- CVS $Id$ -->
  +
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
   
     <map:components>
  @@ -10,15 +12,16 @@
       <map:matchers default="wildcard"/>
     </map:components>
   
  -  <!-- Sitemap for handling the calculator control flow. The parent sitemap
  -  (defined in ../..) handles the HTML page generation -->
  +  <!--+
  +      | Sitemap for handling the calculator control flow. The parent sitemap
  +      | (defined in ../..) handles the HTML page generation
  +      +-->
   
     <map:flow language="JavaScript">
  -      <map:script src="prefs.js"/>
  +    <map:script src="prefs.js"/>
     </map:flow>
   
     <map:pipelines>
  -
       <map:pipeline>
         <map:match pattern="kont/*">
           <map:call continuation="{1}"/>
  @@ -43,9 +46,7 @@
         <map:match pattern="logout/">
           <map:call function="logout"/>
         </map:match>
  -
       </map:pipeline>
  -
     </map:pipelines>
   
   </map:sitemap>
  
  
  

Reply via email to