You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by un...@apache.org on 2004/03/10 14:01:50 UTC

cvs commit: cocoon-2.1/src/webapp/samples/flow/test sitemap.xmap

unico       2004/03/10 05:01:50

  Modified:    src/webapp/samples/flow samples.xml
               src/webapp/samples/flow/prefs sitemap.xmap
               src/webapp/samples/flow/jxcalc sitemap.xmap
               src/webapp/samples/flow/test sitemap.xmap
  Added:       src/webapp/samples/flow/prefs/screens
                        registrationSuccessful.xml login.xml userInfo.xml
                        welcome.xml
               src/webapp/samples/flow/test/screens showString.xml
               src/webapp/samples/flow/jxcalc calc.js
  Removed:     src/webapp/samples/flow/prefs/screens
                        registrationSuccessful.xsp login.xsp welcome.xsp
                        userInfo.xsp
               src/webapp/samples/flow/calc/screens getNumberB.xsp
                        getNumberA.xsp getOperator.xsp displayResult.xsp
               src/webapp/samples/flow/test/screens showString.xsp
               src/webapp/samples/flow/calc sitemap.xmap calc.js
  Log:
  remove dependency on XSP from flow samples
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/webapp/samples/flow/prefs/screens/registrationSuccessful.xml
  
  Index: registrationSuccessful.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  <page>
    <resources>
      <resource type="file" href="prefs.js">Flowscript</resource>
    </resources>
    <title>Registration successful!</title>
    <content>
      <para>
        Congratulations 
        <strong>${user.firstName} ${user.lastName}</strong>!
        You've successfully registered as a new user.
      </para>
      <para>| <link href="edit">Edit my preferences</link> | <link href="logout">Logout</link> |</para>
    </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/flow/prefs/screens/login.xml
  
  Index: login.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  <page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
    <resources>
      <resource type="file" href="prefs.js">Flowscript</resource>
    </resources>
    <title>Login</title>
    <content>
      <jx:if test="errorMsg">
        <strong>${errorMsg}</strong>
      </jx:if>
      <form action="continue.${continuation.id}">
        <para>
          Login name:
          <input type="text" name="login" value="${login}"/>
        </para>
        <para>Password: <input type="password" name="password"/></para>
        <input type="submit" name="submit" value="Login"/>
        <para>Not yet registered? <link href="register">Register now!</link></para>
      </form>
    </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/flow/prefs/screens/userInfo.xml
  
  Index: userInfo.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  <page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
    <resources>
      <resource type="file" href="prefs.js">Flowscript</resource>
    </resources>
    <title>${title}></title>
    <content>
      <jx:choose>
        <jx:when test="errorMsg">
          <para><strong>${errorMsg}</strong></para>
        </jx:when>
        <jx:otherwise>
          <para>Please enter the following data</para>
        </jx:otherwise>
      </jx:choose>
       <form method="post" action="continue.${continuation.id}">
        <para>
          <jx:choose>
            <jx:when test="check and firstName = ''">
              <strong>First name cannot be empty</strong>
            </jx:when>
            <jx:otherwise>
              First name:
            </jx:otherwise>
          </jx:choose>
          <input type="text" name="firstName" value="${firstName}"/>
        </para>
        <para>
          <jx:choose>
            <jx:when test="check and lastName = ''">
              <strong>Last name cannot be empty</strong>
            </jx:when>
            <jx:otherwise>
              Last name:
            </jx:otherwise>
          </jx:choose>
          <input type="text" name="lastName" value="${lastName}"/>
        </para>
        <para>
          <jx:choose>
            <jx:when test="check and email = ''">
              <strong>Email address cannot be empty</strong>
            </jx:when>
            <jx:otherwise>
              Email address:
            </jx:otherwise>
          </jx:choose>
          <input type="text" name="email" value="${email}"/>
        </para>
        <para>
          <jx:choose>
            <jx:when test="check and login = ''">
              <strong>Login name cannot be empty</strong>
            </jx:when>
            <jx:otherwise>
              Login name:
            </jx:otherwise>
          </jx:choose>
          <input type="text" name="login" value="${login}"/>
        </para>
        <para>
          <jx:choose>
            <jx:when test="check and password = ''">
              <strong>Password cannot be empty</strong>
            </jx:when>
            <jx:otherwise>
              Password:
            </jx:otherwise>
          </jx:choose>
          <input type="password" name="password" value="${password}"/>
        </para>
        <input type="submit" name="submit" value="${button}"/>
         <jx:if test="cancel">
          <input type="submit" name="cancel" value="Cancel"/>
        </jx:if>
      </form>
    </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/flow/prefs/screens/welcome.xml
  
  Index: welcome.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  <page>
    <resources>
      <resource type="file" href="prefs.js">Flowscript</resource>
    </resources>
    <title>Welcome!</title>
    <content>
      <para>Welcome back,
        <strong>
          ${user.firstName} ${user.lastName}
        </strong>!
      </para>
      <para>| <link href="edit">Edit my preferences</link> | <link href="logout">Logout</link> |</para>
    </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/flow/test/screens/showString.xml
  
  Index: showString.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  <page>
    <resources>
      <resource type="file" href="sendpage.js">Flowscript</resource>
    </resources>
    <title>Show String</title>
    <content>
      <para>${replaceme}</para>
      <para>${parameter}</para>
    </content>
  </page>
  
  
  
  1.7       +2 -5      cocoon-2.1/src/webapp/samples/flow/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/flow/samples.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- samples.xml	6 Mar 2004 02:25:34 -0000	1.6
  +++ samples.xml	10 Mar 2004 13:01:50 -0000	1.7
  @@ -26,13 +26,10 @@
     </group>
   
     <group name="Cocoon Control Flow">
  -    <sample name="Calculator" href="calc/">
  +    <sample name="Calculator" href="jxcalc/">
       A simple web-based calculator that uses javascript on the server side
       to describe the web application flow between screens in a coherent 
       unique location and continuations to maintain state between requests.
  -   </sample>
  -    <sample name="Calculator 2" href="jxcalc/">
  -     Same sample as the calculator but using the JXGenerator instead of XSP.
       </sample>
      <sample name="User Preferences" href="prefs/">
       A common portion of an application which requires users to be
  
  
  
  1.7       +3 -3      cocoon-2.1/src/webapp/samples/flow/prefs/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/flow/prefs/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap	6 Mar 2004 02:25:54 -0000	1.6
  +++ sitemap.xmap	10 Mar 2004 13:01:50 -0000	1.7
  @@ -43,9 +43,9 @@
       <map:pipeline>
         <!--+
             | Produces the views called by the flowscript
  -          +-->      
  +          +-->
         <map:match pattern="page/*">
  -        <map:generate type="serverpages" src="screens/{1}.xsp"/>
  +        <map:generate type="jx" src="screens/{1}.xml"/>
           <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
             <map:parameter name="servletPath" value="{request:servletPath}"/>
             <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  
  
  
  1.7       +1 -1      cocoon-2.1/src/webapp/samples/flow/jxcalc/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/flow/jxcalc/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap	6 Mar 2004 02:26:05 -0000	1.6
  +++ sitemap.xmap	10 Mar 2004 13:01:50 -0000	1.7
  @@ -19,7 +19,7 @@
   
     <!-- indicates what flowscript to attach to this sitemap -->
     <map:flow language="javascript">
  -    <map:script src="../calc/calc.js"/>
  +    <map:script src="calc.js"/>
     </map:flow>
   
     <map:pipelines>
  
  
  
  1.3       +59 -44    cocoon-2.1/src/webapp/samples/flow/jxcalc/calc.js
  
  
  
  
  1.7       +1 -1      cocoon-2.1/src/webapp/samples/flow/test/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/flow/test/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap	6 Mar 2004 02:26:15 -0000	1.6
  +++ sitemap.xmap	10 Mar 2004 13:01:50 -0000	1.7
  @@ -38,7 +38,7 @@
         </map:match>
   
         <map:match pattern="page/*">
  -        <map:generate type="serverpages" src="screens/{1}.xsp"/>
  +        <map:generate type="jx" src="screens/{1}.xml"/>
           <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
             <map:parameter name="servletPath" value="{request:servletPath}"/>
             <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>