cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From coli...@apache.org
Subject cvs commit: cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp Checkout.xsp ConfirmOrder.xsp NewAccountForm.xsp NewOrderForm.xsp ShippingForm.xsp ViewOrder.xsp Cart.xsp EditAccountForm.xsp Item.xsp Product.xsp SignonForm.xsp
Date Thu, 20 Mar 2003 00:29:56 GMT
coliver     2003/03/19 16:29:56

  Modified:    src/scratchpad/webapp/samples/petstore/flow petstore.js
               src/scratchpad/webapp/samples/petstore/stylesheets
                        site2html.xsl
               src/scratchpad/webapp/samples/petstore/view/xsp Cart.xsp
                        EditAccountForm.xsp Item.xsp Product.xsp
                        SignonForm.xsp
  Added:       src/scratchpad/webapp/samples/petstore/view/xsp Checkout.xsp
                        ConfirmOrder.xsp NewAccountForm.xsp
                        NewOrderForm.xsp ShippingForm.xsp ViewOrder.xsp
  Log:
  incorporate latest xsp changes from leo leonid
  
  Revision  Changes    Path
  1.6       +7 -1      cocoon-2.1/src/scratchpad/webapp/samples/petstore/flow/petstore.js
  
  Index: petstore.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/flow/petstore.js,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- petstore.js	19 Mar 2003 18:18:43 -0000	1.5
  +++ petstore.js	20 Mar 2003 00:29:55 -0000	1.6
  @@ -357,10 +357,16 @@
   // Checkout
   
   function checkout() {
  +    var cartItems = [];
  +    for (var i in cartForm.cart.cartItems) {
  +        var cartItem = cartForm.cart.cartItems[i];
  +        cartItems.push(cartItem);
  +    }
       sendPageAndWait("/view/Checkout.html", {
                       accountForm: accountForm,
                       cartForm: cartForm, 
  -                    yoshi: yoshi
  +		    yoshi: yoshi,
  +		    cartItems: cartItems
       });
       if (accountForm.signOn) {
           signOn();
  
  
  
  1.2       +204 -62   cocoon-2.1/src/scratchpad/webapp/samples/petstore/stylesheets/site2html.xsl
  
  Index: site2html.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/stylesheets/site2html.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- site2html.xsl	17 Mar 2003 15:23:39 -0000	1.1
  +++ site2html.xsl	20 Mar 2003 00:29:55 -0000	1.2
  @@ -6,7 +6,7 @@
       <xsl:template match="site">
           <html>
               <head>
  -                <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  +                <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" />
                   <meta HTTP-EQUIV="Cache-Control" CONTENT="max-age=0"/>
                   <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache"/>
                   <meta http-equiv="expires" content="0"/>
  @@ -21,20 +21,20 @@
                                   <a href="index.do"><img border="0" src="images/logo-topbar.gif" /></a>
                               </td>
                               <td align="right">
  -                                <a href="viewCart.do"><img border="0" name="img_cart" src="images/cart.gif" /></a><img border="0" src="images/separator.gif" />
  +                                <a href="viewCart.do"><img border="0" name="img_cart" src="images/cart.gif" /></a><img border="0" src="images/separator.gif" hspace="4" />
                                   <xsl:choose>
                                       <xsl:when test="@signOn='true'">
                                           <a href="signonForm.do"><img border="0" name="img_signin" src="images/sign-in.gif" /></a>
                                       </xsl:when>
                                       <xsl:otherwise>
  -                                        <a href="signonForm.do?signoff=true"><img border="0" name="img_signout" src="images/sign-out.gif" /></a><img border="0" src="images/separator.gif" />
  +                                        <a href="signonForm.do?signoff=true"><img border="0" name="img_signout" src="images/sign-out.gif" /></a><img border="0" src="images/separator.gif" hspace="4" />
                                           <a href="editAccountForm.do"><img border="0" name="img_myaccount" src="images/my_account.gif" /></a>
                                       </xsl:otherwise>
                                   </xsl:choose>
  -                                <img border="0" src="images/separator.gif" /><a href="../help.html"><img border="0" name="img_help" src="images/help.gif" /></a>
  +                                <img border="0" src="images/separator.gif" hspace="4" /><a href="../help.html"><img border="0" name="img_help" src="images/help.gif" /></a>
                               </td>
                               <td align="left" valign="bottom">
  -                                <form method="get" action="searchProducts.do">
  +                                <form method="post" action="searchProducts.do">
                                       <input name="keyword" size="14" />
                                       <input border="0" src="images/search.gif" type="image" />
                                   </form>
  @@ -44,17 +44,17 @@
                   </table>
                   <center>
                       <a href="viewCategory.do?categoryId=FISH"><img border="0" src="images/sm_fish.gif" /></a> 
  -                    <img border="0" src="images/separator.gif" /> 
  +                    <img border="0" src="images/separator.gif" hspace="4" /> 
                       <a href="viewCategory.do?categoryId=DOGS"><img border="0" src="images/sm_dogs.gif" /></a> 
  -                    <img border="0" src="images/separator.gif" /> 
  +                    <img border="0" src="images/separator.gif" hspace="4" /> 
                       <a href="viewCategory.do?categoryId=REPTILES"><img border="0" src="images/sm_reptiles.gif" /></a> 
  -                    <img border="0" src="images/separator.gif" /> 
  +                    <img border="0" src="images/separator.gif" hspace="4" /> 
                       <a href="viewCategory.do?categoryId=CATS"><img border="0" src="images/sm_cats.gif" /></a> 
  -                    <img border="0" src="images/separator.gif" />
  +                    <img border="0" src="images/separator.gif" hspace="4" />
                       <a href="viewCategory.do?categoryId=BIRDS"><img border="0" src="images/sm_birds.gif" /></a> 
                   </center>
  -                <br />
                   <xsl:apply-templates/>
  +                <br/>
                   <p align="center">
                       <a href="http://cocoon.apache.org"><img border="0" align="center" src="images/cocoon.gif" /></a>
                   </p>
  @@ -71,13 +71,9 @@
                               <tbody>
                                   <tr>
                                       <td valign="top">
  -                                    <!-- SIDEBAR -->
                                           <xsl:apply-templates/>
                                       </td>
                                       <td align="center" bgcolor="white" height="300" width="100%">
  -
  -                                    <!-- MAIN IMAGE -->
  -
                                           <map name="estoremap">
                                               <area alt="Birds" coords="72,2,280,250" href="viewCategory.do?categoryId=BIRDS" shape="RECT" />
                                               <area alt="Fish" coords="2,180,72,250" href="viewCategory.do?categoryId=FISH" shape="RECT" />
  @@ -241,46 +237,109 @@
           </tr>
       </xsl:template>
   
  +    <xsl:template name="cart-common-columns">
  +        <td><b>Item ID</b></td>
  +        <td><b>Product ID</b></td>
  +        <td><b>Description</b></td>
  +        <td><b>Quantity</b></td>
  +        <td><b>List Price</b></td>
  +    </xsl:template>
   
  -    <xsl:template match="cart">
  -        <p>
  +    <xsl:template match="cart[@name='Shopping Cart']">
  +        <table border="0" width="100%" cellspacing="0" cellpadding="0">
  +            <tr>
  +                <td valign="top" width="20%" align="left">
  +                    <xsl:apply-templates select="backpointer" />
  +                </td>
  +                <td valign="top" align="center">
  +                    <h2 align="center"><xsl:value-of select="@name" /></h2>
  +                    <form action="updateCartQuantities.do" method="post" >
  +                        <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="5">
  +                            <tr bgcolor="#cccccc">
  +                                <xsl:call-template name="cart-common-columns" />
  +                                <td></td>
  +                            </tr>
  +                            <xsl:if test="not(item)">
  +                                <tr bgcolor="#FFFF88">
  +                                    <td colspan="6">
  +                                        <b>Your cart is empty.</b>
  +                                    </td>
  +                                </tr>
  +                            </xsl:if>
  +                            <xsl:apply-templates select="item" />
  +                            <tr bgcolor="#FFFF88">
  +                                <td colspan="5" align="right">
  +                                    <b>Sub Total: $<xsl:value-of select="format-number (total, '###,##0.00')"/></b><br />
  +                                    <input type="image" border="0" src="images/button_update_cart.gif" name="update" />
  +                                </td>
  +                                <td></td>
  +                            </tr>
  +                        </table>
  +                    </form>
  +                    <xsl:if test="item">
  +                        <xsl:apply-templates select="nextpointer" />
  +                    </xsl:if>
  +                </td>
  +                <td valign="top" width="20%" align="right">
  +                </td>
  +            </tr>
  +        </table>
  +    </xsl:template>
  +
  +    <xsl:template match="cart[@name='Checkout Summary']">
  +        <table border="0" width="100%" cellspacing="0" cellpadding="0">
  +            <tr>
  +                <td valign="top" width="20%" align="left">
  +                    <xsl:apply-templates select="backpointer" />
  +                </td>
  +                <td valign="top" align="center">
  +                    <h2 align="center"><xsl:value-of select="@name" /></h2>
  +                        <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="5">
  +                            <tr bgcolor="#cccccc">
  +                                <xsl:call-template name="cart-common-columns" />
  +                            </tr>
  +                            <xsl:apply-templates select="item" />
  +                            <tr bgcolor="#FFFF88">
  +                                <td colspan="5" align="right">
  +                                    <b>Sub Total: $<xsl:value-of select="format-number (total, '###,##0.00')"/></b><br />
  +                                </td>
  +                            </tr>
  +                        </table>
  +                        <xsl:apply-templates select="nextpointer" />
  +                </td>
  +                <td valign="top" width="20%" align="right">
  +                </td>
  +            </tr>
  +        </table>
  +    </xsl:template>
  +
  +    <xsl:template match="cart[@name='Status']">
  +        <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="5">
  +            <tr bgcolor="#cccccc">
  +                <xsl:call-template name="cart-common-columns" />
  +            </tr>
  +            <xsl:apply-templates select="item" />
  +            <tr bgcolor="#FFFF88">
  +                <td colspan="5" align="right">
  +                    <b>Total: $<xsl:value-of select="format-number (total, '###,##0.00')"/></b><br />
  +                </td>
  +            </tr>
  +        </table>
  +    </xsl:template>
  +
  +
  +    <xsl:template match="nextpointer">
  +        <br />
               <center>
  -                <b><font size="4"><xsl:value-of select="@name" /></font></b>
  +                <a href="{@do}"><img border="0" src="{@img}" /></a>
               </center>
  -            <form action="updateCartQuantities.do" method="post" >
  -                <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="5">
  -                    <tr bgcolor="#cccccc">
  -                        <td><b>Item ID</b></td>
  -                        <td><b>Product ID</b></td>
  -                        <td><b>Description</b></td>
  -                        <td><b>Quantity</b></td>
  -                        <td><b>List Price</b></td>
  -                        <td></td>
  -                    </tr>
  -                    <xsl:if test="not(item)">
  -                        <tr bgcolor="#FFFF88">
  -                            <td colspan="6">
  -                                <b>Your cart is empty.</b>
  -                            </td>
  -                        </tr>
  -                    </xsl:if>
  -                    <xsl:apply-templates/>
  -                    <tr bgcolor="#FFFF88">
  -                        <td colspan="5" align="right">
  -                            <b>Sub Total: <xsl:value-of select="total" /></b><br />
  -                            <input type="image" border="0" src="images/button_update_cart.gif" name="update" />
  -                        </td>
  -                        <td></td>
  -                    </tr>
  -                </table>
  -            </form>
  -        </p>
       </xsl:template>
   
  +
       <xsl:template match="cart/item">
           <tr bgcolor="#FFFF88">
               <td>
  -                <b><a href="viewItem.do?cartItem=$cartItem.item.itemId"><xsl:value-of select="@id" /></a></b>
  +                <b><xsl:value-of select="@id" /></b>
               </td>
               <td>
                   <xsl:value-of select="@product-id" />
  @@ -289,14 +348,25 @@
                       <xsl:value-of select="desc" />
                </td>
               <td align="center">
  -                <input type="text" size="3" name="{@id}" value="{quantity}" />
  +                <xsl:choose>
  +                    <xsl:when test="../@name='Shopping Cart'">
  +                        <input type="text" size="3" name="{@id}" >
  +                            <xsl:attribute name="value"><xsl:value-of select="format-number (quantity, '####')"/></xsl:attribute>
  +                        </input>
  +                    </xsl:when>
  +                    <xsl:otherwise>
  +                        <xsl:value-of select="format-number (quantity, '####')"/>
  +                    </xsl:otherwise>
  +                </xsl:choose>
               </td>
               <td align="right">
  -                <xsl:value-of select="price" />
  -            </td>
  -            <td><a href="removeItemFromCart.do?workingItemId={@id}">
  -                <img border="0" src="images/button_remove.gif" /></a>
  +                $<xsl:value-of select="format-number (price, '###,##0.00')"/>
               </td>
  +            <xsl:if test="../@name='Shopping Cart'">
  +                <td>
  +                    <a href="removeItemFromCart.do?workingItemId={@id}"><img border="0" src="images/button_remove.gif" /></a>
  +                </td>
  +            </xsl:if>
           </tr>
       </xsl:template>
       
  @@ -330,7 +400,12 @@
                   
                   <tr bgcolor="#FFFF88">
                       <td>
  -                        <xsl:text>$</xsl:text> <xsl:value-of select="price" />
  +                        <xsl:value-of select="format-number (instock, '####')"/> in stock.
  +                    </td>
  +                </tr>
  +                <tr bgcolor="#FFFF88">
  +                    <td>
  +                        $<xsl:value-of select="format-number (price, '###,##0.00')"/>
                       </td>
                   </tr>
                   <tr bgcolor="#FFFF88">
  @@ -366,32 +441,71 @@
                   <input border="0" type="image" src="images/button_submit.gif" name="submit" value="Save Account Information" />
               </center>
           </form>
  -        <xsl:if test="/site/@signOn='true'">
  +        <xsl:if test="/site/@signOn='false'">
               <p>
                   <center><b><a href="listOrders.do">My Orders</a></b></center>
               </p>
           </xsl:if>
       </xsl:template>
   
  -    <xsl:template match="panel">
  -        <font color="darkgreen"><h3><xsl:value-of select="@label" /></h3></font>
  -        <table border="0" cellpadding="3" cellspacing="1" bgcolor="#008800">
  -            <xsl:apply-templates/>
  -        </table>
  +    
  +    <xsl:template match="form[@styleId='workingOrderForm']">
  +        <b><font color="RED"><xsl:value-of select="message" /></font></b>
  +        <form>
  +            <xsl:copy-of select="@action | @method | @styleId"/>
  +                <xsl:apply-templates/>
  +        <p>
  +            <input type="image" src="images/button_submit.gif"/>
  +        </p>
  +        </form>
       </xsl:template>
       
       <xsl:template match="form[@label='signon']">
  +        <xsl:apply-templates select="message"/>
           <form>
               <xsl:copy-of select="@action | @method"/>
               <table align="center" border="0">
                   <tr>
                       <td colspan="2">Please enter your username and password.<br /> </td>
                   </tr>
  -                <xsl:apply-templates/>
  +                <xsl:apply-templates select="input"/>
               </table>
           </form>
       </xsl:template>
       
  +    
  +    <xsl:template match="panel[panel]">
  +        <table width="60%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFF88">
  +            <xsl:if test="@header">
  +                <tr bgcolor="#FFFF88">
  +                    <td align="center" colspan="2">
  +                        <font size="4"><b><xsl:value-of select="@header" /></b></font>
  +                        <xsl:if test="@subheader">
  +                            <br /><font size="3"><b><xsl:value-of select="@subheader" /></b></font>
  +                        </xsl:if>
  +                    </td>
  +                </tr>
  +            </xsl:if>
  +            <xsl:apply-templates/>
  +        </table>
  +    </xsl:template>
  +    
  +    <xsl:template match="panel">
  +        <font color="darkgreen"><h3><xsl:value-of select="@label" /></h3></font>
  +        <table border="0" cellpadding="3" cellspacing="1" bgcolor="#008800">
  +            <xsl:apply-templates/>
  +        </table>
  +    </xsl:template>
  +    
  +    <xsl:template match="panel/panel">
  +        <tr bgcolor="#FFFF88">
  +            <td colspan="2">
  +                <font color="GREEN" size="4"><b><xsl:value-of select="@label" />:</b></font>
  +            </td>
  +        </tr>
  +        <xsl:apply-templates/>
  +    </xsl:template>
  +    
       <xsl:template match="panel/select">
           <tr bgcolor="#FFFF88">
               <td><xsl:value-of select="@label" /></td>
  @@ -410,6 +524,37 @@
           </tr>
       </xsl:template>
       
  +    <xsl:template match="panel/field">
  +        <tr bgcolor="#FFFF88">
  +            <td><xsl:value-of select="@label" />:</td>
  +            <td><xsl:value-of select="." /></td>
  +        </tr>
  +    </xsl:template>
  +
  +    <xsl:template match="panel/field[@empty]">
  +        <tr bgcolor="#FFFF88">
  +            <td colspan="{@empty}"><xsl:value-of select="@label" />
  +                <xsl:apply-templates />
  +            </td>
  +        </tr>
  +    </xsl:template>
  +
  +    <xsl:template match="message">
  +        <br clear="all" />
  +            <center>
  +                <b>
  +                    <font size="4">
  +                        <xsl:if test="@type='warning'">
  +                            <xsl:attribute name="color">RED</xsl:attribute> 
  +                        </xsl:if>
  +                        <xsl:value-of select="." />
  +                    </font>
  +                </b>
  +            </center>
  +        <br clear="all" />
  +    </xsl:template>
  +
  +    
       <xsl:template match="input">
           <tr>
               <td><xsl:value-of select="@label" /></td>
  @@ -417,9 +562,6 @@
           </tr>
       </xsl:template>
       
  -    <xsl:template match="message">
  -        <b><font color="RED"><xsl:value-of select="." /></font></b>
  -    </xsl:template>
   
       <xsl:template match="register">
           <center>
  
  
  
  1.2       +2 -2      cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/Cart.xsp
  
  Index: Cart.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/Cart.xsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Cart.xsp	17 Mar 2003 15:23:39 -0000	1.1
  +++ Cart.xsp	20 Mar 2003 00:29:55 -0000	1.2
  @@ -8,9 +8,8 @@
   
       <site>
           <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute>
  -        <backpointer name="Main Menu" do="index.do" />
           <cart name="Shopping Cart" >
  -        <!-- this doesn't work !!! how do I have to access the required field via jpath?? -->
  +            <backpointer name="Main Menu" do="index.do" />
               <jpath:for-each select="cartItems" >
                   <item>
                       <xsp:attribute name="product-id"><jpath:value-of select="item/productId"/></xsp:attribute>
  @@ -28,6 +27,7 @@
                   </item>
               </jpath:for-each>
               <total><jpath:value-of select="cartForm/cart/subTotal"/></total>
  +            <nextpointer do="checkout.do" img="images/button_checkout.gif" />
           </cart>
       </site>
   
  
  
  
  1.2       +3 -3      cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/EditAccountForm.xsp
  
  Index: EditAccountForm.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/EditAccountForm.xsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EditAccountForm.xsp	17 Mar 2003 15:23:39 -0000	1.1
  +++ EditAccountForm.xsp	20 Mar 2003 00:29:55 -0000	1.2
  @@ -13,7 +13,7 @@
   <!--
           <input type="hidden" name="validate" value="editAccount" />
           <input type="hidden"  name="account.username" /> -->
  -<!-- ...hmm? -->
  +
               <panel label="User Information">
                   <input name="workingAccountForm.account.username" label="User ID" >
                       <xsp:attribute name="value"><jpath:value-of select="account/username" /></xsp:attribute>
  @@ -27,10 +27,10 @@
                       <xsp:attribute name="value"><jpath:value-of select="account/firstName"/></xsp:attribute>
                   </input>
                   <input type="text" label="Last name" >
  -                    <xsp:attribute name="value"><jpath:value-of select="account/firstName"/></xsp:attribute>
  +                    <xsp:attribute name="value"><jpath:value-of select="account/lastName"/></xsp:attribute>
                   </input>
                   <input type="text" size="40" name="workingAccountForm.email" label="Email" >
  -                    <xsp:attribute name="value"><jpath:value-of select="account/lastName"/></xsp:attribute>
  +                    <xsp:attribute name="value"><jpath:value-of select="account/email"/></xsp:attribute>
                   </input>
                   <input type="text" name="workingAccountForm.phone" label="Phone" >
                       <xsp:attribute name="value"><jpath:value-of select="account/phone"/></xsp:attribute>
  
  
  
  1.2       +1 -1      cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/Item.xsp
  
  Index: Item.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/Item.xsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Item.xsp	17 Mar 2003 15:23:39 -0000	1.1
  +++ Item.xsp	20 Mar 2003 00:29:55 -0000	1.2
  @@ -23,8 +23,8 @@
                   <jpath:value-of select="item/attr5"/> 
                   <jpath:value-of select="item/product/name"/> 
               </desc>
  +            <instock><jpath:value-of select="quantity"/></instock>
               <price><jpath:value-of select="item/listPrice"/></price>
  -<!--                    <item-quantity><jpath:value-of select="item/quantity"/></item-quantity>-->
           </item>
   
       </site>
  
  
  
  1.2       +0 -6      cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/Product.xsp
  
  Index: Product.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/Product.xsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Product.xsp	17 Mar 2003 15:23:39 -0000	1.1
  +++ Product.xsp	20 Mar 2003 00:29:56 -0000	1.2
  @@ -6,9 +6,6 @@
     xmlns:jpath="http://apache.org/xsp/jpath/1.0"
     >
   
  -
  -
  -
       <site>
           <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute>
           <backpointer>
  @@ -40,7 +37,4 @@
       </site>
   
   </xsp:page>
  -
  -
  -
   
  
  
  
  1.2       +1 -1      cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/SignonForm.xsp
  
  Index: SignonForm.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/SignonForm.xsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SignonForm.xsp	17 Mar 2003 15:23:40 -0000	1.1
  +++ SignonForm.xsp	20 Mar 2003 00:29:56 -0000	1.2
  @@ -10,7 +10,7 @@
           <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute>
           <form method="POST" label="signon">
               <xsp:attribute name="action"><jpath:continuation/>.kont</xsp:attribute>
  -            <message><jpath:value-of select="//message"/></message>
  +            <message type="warning"><jpath:value-of select="//message"/></message>
               <input type="text" name="username" value="j2ee" label="Username" />
               <input type="password" name="password" value="j2ee" label="Password" />
               <input type="image" src="images/button_submit.gif" name="update" />
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/Checkout.xsp
  
  Index: Checkout.xsp
  ===================================================================
  <?xml version="1.0"?>
  
  <xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp"
    xmlns:jpath="http://apache.org/xsp/jpath/1.0"
    >
  
      <site>
          <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute>
          <cart name="Checkout Summary">
              <backpointer name="Shopping Cart" do="viewCart.do" />
              <jpath:for-each select="cartItems" >
                  <item>
                      <xsp:attribute name="product-id"><jpath:value-of select="item/productId"/></xsp:attribute>
                      <xsp:attribute name="id"><jpath:value-of select="item/itemId"/></xsp:attribute>
                      <desc>
                          <jpath:value-of select="item/attr1"/> 
                          <jpath:value-of select="item/attr2"/> 
                          <jpath:value-of select="item/attr3"/> 
                          <jpath:value-of select="item/attr4"/> 
                          <jpath:value-of select="item/attr5"/> 
                          <jpath:value-of select="item/product/name"/> 
                      </desc>
                      <price><jpath:value-of select="item/listPrice"/></price>
                      <quantity><jpath:value-of select="quantity"/></quantity>
                  </item>
              </jpath:for-each>
              <total><jpath:value-of select="cartForm/cart/subTotal"/></total>
              <nextpointer img="images/button_continue.gif">
                  <xsp:attribute name="do"><jpath:continuation/>.kont</xsp:attribute>
              </nextpointer>
          </cart>
      </site>
  
  </xsp:page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/ConfirmOrder.xsp
  
  Index: ConfirmOrder.xsp
  ===================================================================
  <?xml version="1.0"?>
  
  <xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp"
    xmlns:jpath="http://apache.org/xsp/jpath/1.0"
    >
  
      <site>
      <!--    <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute> -->
          <backpointer name="Main Menu" do="index.do" />
          <message>Please confirm the information below and then press continue...</message>
          <panel>
              <xsp:attribute name="header">Order #<jpath:value-of select="order/orderId" /></xsp:attribute>
              <xsp:attribute name="subheader"><jpath:value-of select="order/orderDate" /></xsp:attribute>
              
              <panel label="Payment Details">
                  <field label="Card Type"><jpath:value-of select="order/cardType" /></field>
                  <field label="Card Number"><jpath:value-of select="order/creditCard" /></field>
                  <field label="Expiry Date (MM/YYYY)"><jpath:value-of select="order/expiryDate" /></field>
              </panel>
              <panel label="Billing Address">
                  <field label="First name"><jpath:value-of select="order/billToFirstName"/></field>
                  <field label="Last name" ><jpath:value-of select="order/billToLastName"/></field>
                  <field label="Address 1" ><jpath:value-of select="order/billAddress1"/></field>
                  <field label="Address 2" ><jpath:value-of select="order/billAddress2"/></field>
                  <field label="City" ><jpath:value-of select="order/billCity"/></field>
                  <field label="State" ><jpath:value-of select="order/billState"/></field>
                  <field label="Zip" ><jpath:value-of select="order/billZip"/></field>
                  <field label="Country" ><jpath:value-of select="order/billCountry"/></field>
              </panel>
              <panel label="Shipping Address">
                  <field label="First name"><jpath:value-of select="order/shipToFirstName"/></field>
                  <field label="Last name" ><jpath:value-of select="order/shipToLastName"/></field>
                  <field label="Address 1" ><jpath:value-of select="order/shipAddress1"/></field>
                  <field label="Address 2" ><jpath:value-of select="order/shipAddress2"/></field>
                  <field label="City" ><jpath:value-of select="order/shipCity"/></field>
                  <field label="State" ><jpath:value-of select="order/shipState"/></field>
                  <field label="Zip" ><jpath:value-of select="order/shipZip"/></field>
                  <field label="Country" ><jpath:value-of select="order/shipCountry"/></field>
              </panel>
          </panel>
          <nextpointer img="images/button_continue.gif">
              <xsp:attribute name="do"><jpath:continuation/>.kont?confirmed=true</xsp:attribute>
          </nextpointer>
      </site>
  
  </xsp:page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/NewAccountForm.xsp
  
  Index: NewAccountForm.xsp
  ===================================================================
  <?xml version="1.0"?>
  
  <xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp"
    xmlns:jpath="http://apache.org/xsp/jpath/1.0"
    >
  
      <site>
          <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute>
          <form method="POST" styleId="workingAccountForm">
              <xsp:attribute name="action"><jpath:continuation/>.kont</xsp:attribute>
  <!--
          <input type="hidden" name="validate" value="editAccount" />
          <input type="hidden"  name="account.username" /> -->
              <panel label="User Information">
                  <input name="workingAccountForm.account.username" label="User ID" />
                  <input type="password" name="workingAccountForm.account.password" label="New password" />
                  <input type="password" name="workingAccountForm.repeatedPassword" label="Repeat password" />
              </panel>
              
              <panel label="Account Information">
                  <input type="text" label="First name"/>
                  <input type="text" label="Last name" />
                  <input type="text" size="40" name="workingAccountForm.email" label="Email" />
                  <input type="text" name="workingAccountForm.phone" label="Phone" />
                  <input type="text" size="40" name="workingAccountForm.address1" label="Address 1" />
                  <input type="text" size="40" name="workingAccountForm.address2" label="Address 2" />
                  <input type="text" name="workingAccountForm.city" label="City" />
                  <input type="text" name="workingAccountForm.state" label="State" />
                  <input type="text" name="workingAccountForm.zip" label="Zip" />
                  <input type="text" size="15" name="workingAccountForm.country" label="Country" />
              </panel>
              
              <panel label="Profile Information">
                  <select name="workingAccountForm.languagePreference" label="Language Preference">
                      <option value="English">English</option>
                      <option value="Japanese">Japanese</option>
                  </select>
                  <select name="workingAccountForm.account.favouriteCategoryId" label="Favourite Category">
                      <jpath:for-each select="categoryList" >
                          <option><xsp:attribute name="value"><jpath:value-of select="name" /></xsp:attribute><jpath:value-of select="name" /></option>
                      </jpath:for-each>
                  </select>
                  <input type="checkbox" name="workingAccountForm.account.listOption" label="Enable MyList"/> 
                  <input type="checkbox" name="workingAccountForm.account.bannerOption" label="Enable MyBanner"/>
              </panel>
              
          </form>
      </site>
  
  </xsp:page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/NewOrderForm.xsp
  
  Index: NewOrderForm.xsp
  ===================================================================
  <?xml version="1.0"?>
  
  <xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp"
    xmlns:jpath="http://apache.org/xsp/jpath/1.0"
    >
  
      <site>
      <!--    <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute> -->
          <form method="POST" styleId="workingOrderForm">
              <xsp:attribute name="action"><jpath:continuation/>.kont</xsp:attribute>
          <panel>
              <panel label="Payment Details">
                  <select name="order.cardType" label="Card Type">
                      <jpath:for-each select="creditCardTypes" >
                          <option><xsp:attribute name="value"><jpath:value-of select="." /></xsp:attribute><jpath:value-of select="." /></option>
                      </jpath:for-each>
                  </select>
                  <input type="text" name="creditCard" label="Card Number" />
                  <input type="text" name="expiryDate" label="Expiry Date (MM/YYYY)" />
              </panel>
              <panel label="Billing Address">
                  <input type="text" name="billToFirstName" label="First name">
                      <xsp:attribute name="value"><jpath:value-of select="order/billToFirstName"/></xsp:attribute>
                  </input>
                  <input type="text" name="billToLastName" label="Last name" >
                      <xsp:attribute name="value"><jpath:value-of select="order/billToLastName"/></xsp:attribute>
                  </input>
                  <input type="text" size="40" name="billAddress1"  label="Address 1" >
                      <xsp:attribute name="value"><jpath:value-of select="order/billAddress"/></xsp:attribute>
                  </input>
                  <input type="text" size="40" name="billAddress2" label="Address 2" >
                      <xsp:attribute name="value"><jpath:value-of select="order/billAddress2"/></xsp:attribute>
                  </input>
                  <input type="text" name="billCity" label="City" >
                      <xsp:attribute name="value"><jpath:value-of select="order/billCity"/></xsp:attribute>
                  </input>
                  <input type="text" name="billState" label="State" >
                      <xsp:attribute name="value"><jpath:value-of select="order/billState"/></xsp:attribute>
                  </input>
                  <input type="text" name="billZip" label="Zip" >
                      <xsp:attribute name="value"><jpath:value-of select="order/billZip"/></xsp:attribute>
                  </input>
                  <input type="text" size="15" name="billCountry" label="Country" >
                      <xsp:attribute name="value"><jpath:value-of select="order/billCountry"/></xsp:attribute>
                  </input>
                  <input type="checkbox" name="shippingAddressRequired" label="Ship to different address..."/>
              </panel>
          </panel>
          </form>
      </site>
  
  </xsp:page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/ShippingForm.xsp
  
  Index: ShippingForm.xsp
  ===================================================================
  <?xml version="1.0"?>
  
  <xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp"
    xmlns:jpath="http://apache.org/xsp/jpath/1.0"
    >
  
      <site>
      <!--    <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute> -->
          <form method="POST" styleId="workingOrderForm">
              <xsp:attribute name="action"><jpath:continuation/>.kont</xsp:attribute>
          <panel>
              <panel label="Shipping Address">
                  <input type="text" name="shipToFirstName" label="First name" />
                  <input type="text" name="shipToLastName" label="Last name" />
                  <input type="text" name="shipAddress1" size="40" label="Address 1" />
                  <input type="text" name="shipAddress2" size="40" label="Address 2" />
                  <input type="text" name="shipCity" label="City" />
                  <input type="text" name="shipState" label="State" />
                  <input type="text" name="shipZip" label="Zip" />
                  <input type="text" name="shipCountry" size="15" label="Country" />
              </panel>
          </panel>
          </form>
      </site>
  
  </xsp:page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/xsp/ViewOrder.xsp
  
  Index: ViewOrder.xsp
  ===================================================================
  <?xml version="1.0"?>
  
  <xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp"
    xmlns:jpath="http://apache.org/xsp/jpath/1.0"
    >
  
      <site>
      <!--    <xsp:attribute name="signOn"><jpath:value-of select="accountForm/signOn"/></xsp:attribute> -->
          <backpointer name="Main Menu" do="index.do" />
          <message></message>
          <panel>
              <xsp:attribute name="header">Order #<jpath:value-of select="order/orderId" /></xsp:attribute>
              <xsp:attribute name="subheader"><jpath:value-of select="order/orderDate" /></xsp:attribute>
              
              <panel label="Payment Details">
                  <field label="Card Type"><jpath:value-of select="order/cardType" /></field>
                  <field label="Card Number"><jpath:value-of select="order/creditCard" /></field>
                  <field label="Expiry Date (MM/YYYY)"><jpath:value-of select="order/expiryDate" /></field>
              </panel>
              <panel label="Billing Address">
                  <field label="First name"><jpath:value-of select="order/billToFirstName"/></field>
                  <field label="Last name" ><jpath:value-of select="order/billToLastName"/></field>
                  <field label="Address 1" ><jpath:value-of select="order/billAddress1"/></field>
                  <field label="Address 2" ><jpath:value-of select="order/billAddress2"/></field>
                  <field label="City" ><jpath:value-of select="order/billCity"/></field>
                  <field label="State" ><jpath:value-of select="order/billState"/></field>
                  <field label="Zip" ><jpath:value-of select="order/billZip"/></field>
                  <field label="Country" ><jpath:value-of select="order/billCountry"/></field>
              </panel>
              <panel label="Shipping Address">
                  <field label="First name"><jpath:value-of select="order/shipToFirstName"/></field>
                  <field label="Last name" ><jpath:value-of select="order/shipToLastName"/></field>
                  <field label="Address 1" ><jpath:value-of select="order/shipAddress1"/></field>
                  <field label="Address 2" ><jpath:value-of select="order/shipAddress2"/></field>
                  <field label="City" ><jpath:value-of select="order/shipCity"/></field>
                  <field label="State" ><jpath:value-of select="order/shipState"/></field>
                  <field label="Zip" ><jpath:value-of select="order/shipZip"/></field>
                  <field label="Country" ><jpath:value-of select="order/shipCountry"/></field>
                  <field label="Courier" ><jpath:value-of select="order/courier"/></field>
              </panel>
              <panel label="Status">
                  <field empty="2">
                      <cart name="Status">
                          <jpath:for-each select="itemList" >
                              <item>
                                  <xsp:attribute name="product-id"><jpath:value-of select="item/productId"/></xsp:attribute>
                                  <xsp:attribute name="id"><jpath:value-of select="item/itemId"/></xsp:attribute>
                                  <desc>
                                      <jpath:value-of select="item/attr1"/> 
                                      <jpath:value-of select="item/attr2"/> 
                                      <jpath:value-of select="item/attr3"/> 
                                      <jpath:value-of select="item/attr4"/> 
                                      <jpath:value-of select="item/attr5"/> 
                                      <jpath:value-of select="item/product/name"/> 
                                  </desc>
                                  <price><jpath:value-of select="item/listPrice"/></price>
                                  <quantity><jpath:value-of select="quantity"/></quantity>
                              </item>
                          </jpath:for-each>
                          <total><jpath:value-of select="order/totalPrice"/></total>
                      </cart>
                  </field>
              </panel>
              
              
          </panel>
      </site>
  
  </xsp:page>
  
  
  
  
  
  
  

Mime
View raw message