cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/velocity/samples sitemap.xmap samples.xml
Date Sat, 17 Apr 2004 08:27:05 GMT
antonio     2004/04/17 01:27:05

  Added:       src/blocks/petstore/samples/view/velocity Cart.vm
                        IncludeTop.vm IncludeQuickHeader.vm
                        IncludeBottom.vm Category.vm Error.vm ViewOrder.vm
                        SearchProducts.vm ConfirmOrder.vm ListOrders.vm
                        Item.vm Product.vm index.vm IncludeMyList.vm
                        SignonForm.vm
               src/blocks/velocity/samples sitemap.xmap samples.xml
  Removed:     src/blocks/petstore/samples/view/templates ConfirmOrder.vm
                        IncludeTop.vm Category.vm index.vm Item.vm
                        ListOrders.vm Product.vm SearchProducts.vm Error.vm
                        Cart.vm IncludeBottom.vm SignonForm.vm
                        IncludeMyList.vm ViewOrder.vm IncludeQuickHeader.vm
  Log:
  Moving view/templates to view/velocity dir
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/Cart.vm
  
  Index: Cart.vm
  ===================================================================
  #*
    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.
  *#
  #parse("view/velocity/IncludeTop.vm")
  <table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr><td valign="top" width="20%" align="left">
  <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  <tr><td bgcolor="#FFFF88">
  <a href="index.do"><b><font color="BLACK" size="2">&lt;&lt; Main
Menu</font></b></a>
  </td></tr>
  </table>
  </td><td valign="top" align="center">
  <h2 align="center">$label</h2>
  <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><b>Total Cost</b></td>
  #if ($label == 'Shopping Cart')
  <td> </td>
  #end
    </tr>
  
  #if ($cartForm.cart.numberOfItems.intValue() == 0)
  <tr bgcolor="#FFFF88"><td colspan="6"><b>Your cart is empty.</b></td></tr>
  #end
  
  #foreach ($cartItem in $cartForm.cart.cartItems)
    <tr bgcolor="#FFFF88">
    <td><b>
   $cartItem.item.itemId
   <a href="viewItem.do?cartItem=$cartItem.item.itemId">
  </a></b></td>
    <td>$cartItem.item.productId</td>
    <td>
       $!cartItem.item.attr1
       $!cartItem.item.attr2
       $!cartItem.item.attr3
       $!cartItem.item.attr4
       $!cartItem.item.attr5
       $cartItem.item.product.name
     </td>
    <td align="center">
    #if ($label == 'Shopping Cart')
    <input type="text" size="3" name="$cartItem.item.itemId" value="$cartItem.quantity.intValue()"
/>
    #end
    #if ($label == 'Checkout Summary')
      $cartItem.quantity.intValue()
    #end
    </td>
    <td align="right">$fmt.formatNumber($cartItem.item.listPrice, '$#,##0.00')</td>
    <td align="right">$fmt.formatNumber($cartItem.total, '$#,##0.00')</td>
    #if ($label == 'Shopping Cart')
    <td><a href="removeItemFromCart.do?workingItemId=$cartItem.item.itemId">
    <img border="0" src="images/button_remove.gif" /></a></td>
    #end
    </tr>
  #end
  <tr bgcolor="#FFFF88">
  <td colspan="6" align="right">
  
  <b>Sub Total: $fmt.formatNumber($cartForm.cart.subTotal, '$#,##0.00')</b><br
/>
  #if ($label == 'Shopping Cart')
  <input type="image" border="0" src="images/button_update_cart.gif" name="update" />
  #end
  </td>
  #if ($label == 'Shopping Cart')
    <td> </td>
  #end
  
  
  </tr>
  </table>
  </form>
  
  #if ($cartForm.cart.numberOfItems.intValue() > 0)
  
    #if ($label == 'Shopping Cart')
  <br /><center><a href="checkout.do"><img border="0" src="images/button_checkout.gif"
/></a></center>
  #end
  
    #if ($label == 'Checkout Summary')
      <br /><center><a href="${continuation.id}.kont"><img border="0"
src="images/button_continue.gif" /></a></center>
    #end
  
  #end
  
  </td>
  
  
  <td valign="top" width="20%" align="right">
  #if ($accountForm)
   #if ($accountForm.account)
    #if ($accountForm.account.username)
      #if ($accountForm.account.listOption)
        #parse("view/velocity/IncludeMyList.vm")
      #end
    #end
  #end
  #end
  </td>
  
  </tr>
  </table>
  
  #parse("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/IncludeTop.vm
  
  Index: IncludeTop.vm
  ===================================================================
  #*
    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.
  *#
  <html><head>
  <title>Cocoon Petstore Demo</title>
  <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"/>
  <META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT"/>
  <META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
  </head>
  
  <body bgcolor="white">
  
  <table background="images/bkg-topbar.gif" border="0" cellspacing="0" cellpadding="5"
width="100%">
    <tbody>
    <tr>
      <td>
        <form method="post" action="index.do">
          <input type="image" border="0" src="images/logo-topbar.gif" />
          <select name="view" width="14" align="left" onChange="document.forms[0].submit()">
            <option value="jexl">Jexl</option>
            <option value="jxpath">JXPath</option>
            <option value="xsp">Xsp</option>
            <option value="velocity" selected="selected">Velocity</option>
          </select>
        </form>
      </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" />
  
  #if ($accountForm.signOn)
        <a href="signonForm.do">
        <img border="0" name="img_signin" src="images/sign-in.gif" /></a>
  #else
        <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="editAccount.do">
        <img border="0" name="img_myaccount" src="images/my_account.gif" /></a>
  #end
  
      <img border="0" src="images/separator.gif" /><a href="../help.html"><img
border="0" name="img_help" src="images/help.gif" /></a>
      </td>
      <td align="left" valign="bottom">
        <form method="post" action="searchProducts.do">
          <input name="keyword" size="14" /> <input border="0" src="images/search.gif"
type="image" />
        </form>
      </td>
    </tr>
    </tbody>
  </table>
  
  #parse( "view/velocity/IncludeQuickHeader.vm" )
  
  <!-- Support for non-traditional but simpler use of errors... -->
  #if ($errors)
    #foreach ($error in $errors)
      <B><FONT color=RED>
        <BR>$error
      </FONT></B>
    #end
  #end
  
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/IncludeQuickHeader.vm
  
  Index: IncludeQuickHeader.vm
  ===================================================================
  #*
    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.
  *#
  <center>
  <a href="viewCategory.do?categoryId=FISH">
  <img border="0" src="images/sm_fish.gif" /></a>
  <img border="0" src="images/separator.gif" />
  <a href="viewCategory.do?categoryId=DOGS">
  <img border="0" src="images/sm_dogs.gif" /></a>
  <img border="0" src="images/separator.gif" />
  <a href="viewCategory.do?categoryId=REPTILES">
  <img border="0" src="images/sm_reptiles.gif" /></a>
  <img border="0" src="images/separator.gif" />
  <a href="viewCategory.do?categoryId=CATS">
  <img border="0" src="images/sm_cats.gif" /></a>
  <img border="0" src="images/separator.gif" />
  <a href="viewCategory.do?categoryId=BIRDS">
  <img border="0" src="images/sm_birds.gif" /></a>
  </center>
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/IncludeBottom.vm
  
  Index: IncludeBottom.vm
  ===================================================================
  #*
    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.
  *#
  <br />
  #if ($accountForm.account)
    #if ($accountForm.account.username)
      #if ($accountForm.account.bannerOption) 
        <table align="center" background="images/bkg-topbar.gif" cellpadding="5" width="100%">
        <tr><td>
  #if ($accountForm.account.bannerName.length() > 0) 
        <center>
            $accountForm.account.bannerName
  	  </image>
        </center>
  #end
        </td></tr>
        </table>
      #end
    #end
  #end
  <p align="center">
  <a href="http://cocoon.apache.org/"><img border="0" align="center" src="images/cocoon.gif"
/></a>
  </p>
  </body>
  </html>
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/Category.vm
  
  Index: Category.vm
  ===================================================================
  #*
    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.
  *#
  #parse("view/velocity/IncludeTop.vm")
  
  <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  <tr><td bgcolor="#FFFF88">
  <a href="index.do"><b><font color="BLACK" size="2">&lt;&lt; Main
Menu</font></b></a>
  </td></tr>
  </table>
  
  <p>
  <center>
    <h2>$category.name</h2>
  </center>
  <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="3">
    <tr bgcolor="#CCCCCC">  <td><b>Product ID</b></td>  <td><b>Name</b></td>
   </tr>
  #foreach ($product in $productList)
    <tr bgcolor="#FFFF88">
    <td><b><a href="viewProduct.do?productId=$product.productId"><font
color="BLACK">$product.productId</font></a></b></td>
    <td>$product.name</td>
    </tr>
  #end
    <tr><td>
  #if (!$firstPage)
      <a href="${continuation.id}.kont?page=previous"><font color="white"><B>&lt;&lt;
Prev</B></font></a>
  #end
  #if (!$lastPage)
      <a href="${continuation.id}.kont?page=next"><font color="white"><B>Next
&gt;&gt;</B></font></a>
  #end
    </td></tr>
  </table>
  </p>
  #parse("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/Error.vm
  
  Index: Error.vm
  ===================================================================
  #*
    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.
  *#
  #parse ("view/velocity/IncludeTop.vm")
  
  <H3>Error!</H3>
  
  #if ($message)
    <B>$message</B>
  #else
    <B>No further information was provided.</B>
  #end
  
  #parse ("view/velocity/IncludeBottom.vm")
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/ViewOrder.vm
  
  Index: ViewOrder.vm
  ===================================================================
  #*
    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.
  *#
  #parse ("view/velocity/IncludeTop.vm")
  
  <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  <tr><td bgcolor="#FFFF88">
  <a href="index.do"><b><font color="BLACK" size="2">&lt;&lt; Main
Menu</font></b></a>
  </td></tr>
  <!--<tr><td bgcolor="#FFFF88">
  <a href="viewOrder.do?webservice=true&amp;orderId=$order.orderId">
   <font color="BLACK" size="2"><B>
     View with Web Service
   </B></font>
  </a>
  </td></tr>-->
  
  
  </table>
  #if ($message)
    <center><b>$message</b></center>
  #end
  
  
  <table width="60%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFF88">
  <tr bgcolor="#FFFF88"><td align="center" colspan="2">
    <font size="4"><b>Order #$archivedOrder.orderId</b></font>
    <br /><font size="3"><b>$fmt.formatDate($archivedOrder.orderDate, 'yyyy/MM/dd
hh:mm:ss')</b></font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td colspan="2">
  <font color="GREEN" size="4"><b>Payment Details</b></font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Card Type:</td><td>
  $archivedOrder.cardType
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Card Number:</td><td>$archivedOrder.creditCard<font color="red" size="2">*
Fake number!</font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Expiry Date (MM/YYYY):</td><td>$archivedOrder.exprdate
  </td></tr>
  <tr bgcolor="#FFFF88"><td colspan="2">
  <font color="GREEN" size="4"><b>Billing Address</b></font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  First name:</td><td>$archivedOrder.billToFirstName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Last name:</td><td>$archivedOrder.billToLastName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 1:</td><td>$archivedOrder.billaddr1
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 2:</td><td>$archivedOrder.billaddr2
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  City: </td><td>$archivedOrder.billCity
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  State:</td><td>$archivedOrder.billState
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Zip:</td><td>$archivedOrder.billZip
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Country: </td><td>$archivedOrder.billCountry
  </td></tr>
  <tr bgcolor="#FFFF88"><td colspan="2">
  <font color="GREEN" size="4"><b>Shipping Address</b></font>
  </td></tr><tr bgcolor="#FFFF88"><td>
  First name:</td><td>$archivedOrder.shipToFirstName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Last name:</td><td>$archivedOrder.shipToLastName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 1:</td><td>$archivedOrder.shipaddr1
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 2:</td><td>$archivedOrder.shipaddr2
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  City: </td><td>$archivedOrder.shipCity
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  State:</td><td>$archivedOrder.shipState
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Zip:</td><td>$archivedOrder.shipZip
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Country: </td><td>$archivedOrder.shipCountry
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Courier: </td><td>$archivedOrder.courier
  </td></tr>
  <tr bgcolor="#FFFF88"><td colspan="2">
    <b><font color="GREEN" size="4">Status:</font> $archivedOrder.status</b>
  </td></tr>
  <tr bgcolor="#FFFF88"><td colspan="2">
  <table width="100%" align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="3">
    <tr bgcolor="#CCCCCC">
    <td><b>Pos.</b></td>
    <td><b>Item ID</b></td>
    <td><b>Quantity</b></td>
    <td><b>List Price</b></td>
    <td><b>Total Cost</b></td>
    </tr>
  #foreach ($lineItem in $lineItemList)
  
    <tr bgcolor="#FFFF88">
    <td>$lineItem.linenum.intValue().</td>
    <td><b><a href="viewItem.do?itemId=$cartItem.item.itemId"><font color="BLACK">$lineItem.itemId</font></a></b></td>
    <td>$lineItem.quantity.intValue()</td>
    <td align="right">$fmt.formatNumber($lineItem.unitprice, '$#,##0.00')</td>
    <td align="right">$fmt.formatNumber($lineItem.total, '$#,##0.00')</td>
    </tr>
  #end
    <tr bgcolor="#FFFF88">
    <td colspan="5" align="right"><b>Total: $fmt.formatNumber($archivedOrder.totalPrice,
'$#,##0.00')</b></td>
    </tr>
  </table>
  </td></tr>
  
  
  
  </table>
  
  #parse ("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/SearchProducts.vm
  
  Index: SearchProducts.vm
  ===================================================================
  #*
    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.
  *#
  #parse ("view/velocity/IncludeTop.vm")
  
  
  <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  <tr><td bgcolor="#FFFF88">
  <a href="index.do"><b><font color="BLACK" size="2">&lt;&lt; Main
Menu</font></b></a>
  </td></tr>
  </table>
  
  <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="3">
    <tr bgcolor="#CCCCCC">  <td> </td>  <td><b>Product ID</b></td>
 <td><b>Name</b></td>  </tr>
  #foreach ($product in $searchResultsProductList)
    <tr bgcolor="#FFFF88">
    <td><a href="viewProduct.do?productId=$product.productId">
  $product.descn</image></a></td>
    <td><b><a href="viewProduct.do?productId=$product.productId"><font
color="BLACK">$product.productId</font></a></b></td>
    <td>$product.name</td>
    </tr>
  #end
    <tr>
    <td>
  #if (!$firstPage)
      <a href="${continuation.id}.kont?page=previous"><font color="white"><B>&lt;&lt;
Prev</B></font></a>
  #end
  #if (!$lastPage)
      <a href="${continuation.id}.kont?page=next"><font color="white"><B>Next
&gt;&gt;</B></font></a>
  #end
    </td>
    </tr>
  
  </table>
  
  #parse ("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/ConfirmOrder.vm
  
  Index: ConfirmOrder.vm
  ===================================================================
  #*
    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.
  *#
  #parse ("view/velocity/IncludeTop.vm")
  
  
  <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  <tr><td bgcolor="#FFFF88">
  <a href="index.do"><b><font color="BLACK" size="2">&lt;&lt; Main
Menu</font></b></a>
  </td></tr>
  </table>
  
  <p>
  <center>
  <b>Please confirm the information below and then press continue...</b>
  </center>
  <p>
  <table width="60%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFF88">
  <tr bgcolor="#FFFF88"><td align="center" colspan="2">
    <font size="4"><b>Order</b></font>
    <br /><font size="3"><b>$fmt.formatDate($order.orderDate, 'yyyy/MM/dd
hh:mm:ss')</b></font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td colspan="2">
  <font color="GREEN" size="4"><b>Payment Details</b></font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Card Type:</td><td>
  $order.cardType
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Card Number:</td><td>$order.creditCard <font color="red" size="2">* Fake
number!</font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Expiry Date (MM/YYYY):</td><td>$order.expiryDate
  </td></tr>
  
  <tr bgcolor="#FFFF88"><td colspan="2">
  <font color="GREEN" size="4"><b>Billing Address</b></font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  First name:</td><td>$order.billToFirstName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Last name:</td><td>$order.billToLastName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 1:</td><td>$order.billAddress1
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 2:</td><td>$order.billAddress2
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  City: </td><td>$order.billCity
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  State:</td><td>$order.billState
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Zip:</td><td>$order.billZip
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Country: </td><td>$order.billCountry
  </td></tr>
  <tr bgcolor="#FFFF88"><td colspan="2">
  <font color="GREEN" size="4"><b>Shipping Address</b></font>
  </td></tr><tr bgcolor="#FFFF88"><td>
  First name:</td><td>$order.shipToFirstName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Last name:</td><td>$order.shipToLastName
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 1:</td><td>$order.shipAddress1
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Address 2:</td><td>$order.shipAddress2
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  City: </td><td>$order.shipCity
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  State:</td><td>$order.shipState
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Zip:</td><td>$order.shipZip
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  Country: </td><td>$order.shipCountry
  </td></tr>
  
  </table>
  <p>
  <center><a href="${continuation.id}.kont?confirmed=true"><img border="0"
src="images/button_continue.gif" /></a></center>
  
  </p></p></p>
  #parse ("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/ListOrders.vm
  
  Index: ListOrders.vm
  ===================================================================
  #*
    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.
  *#
  #parse ("view/velocity/IncludeTop.vm")
  
  <p>
  <center>
  <h2>My Orders</h2>
  </center>
  <table cellpadding="3" cellspacing="2" border="0" bgcolor="#008800" align="center">
  <tr bgcolor="#CCCCCC">
    <td><b>Order ID</b></td>
    <td><b>Date</b></td>
    <td><b>Total Price</b></td>
    <td><b>Status</b></td>
  </tr>
  #foreach ($order in $orderList)
  <tr bgcolor="#FFFF88">
    <td><b><a href="viewOrder.do?orderId=${order.orderid}"><font color="BLACK">$order.orderid</font></a></b></td>
    <td>$order.orderdate</td>
    <td>$fmt.formatNumber($order.totalprice, '$#,##0.00')</td>
    <td><b>$order.status</b></td>
  </tr>
  #end
  </table>
  </p>
  
  
  #parse("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/Item.vm
  
  Index: Item.vm
  ===================================================================
  #*
    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.
  *#
  #parse("view/velocity/IncludeTop.vm")
  
  <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  <tr><td bgcolor="#FFFF88">
  <a href="viewProduct.do?productId=$product.productId"><b><font color="BLACK"
size="2">&lt;&lt; $product.name</font></b></a>
  </td></tr>
  </table>
  
  <p>
  
  
  <table align="center" bgcolor="#008800" cellspacing="2" cellpadding="3" border="0" width="60%">
  <tr bgcolor="#FFFF88">
  <td bgcolor="#FFFFFF">
  $product.descn</image>
  </td>
  </tr>
  <tr bgcolor="#FFFF88">
  <td width="100%" bgcolor="#cccccc">
    <b>$item.itemId</b>
  </td>
  </tr><tr bgcolor="#FFFF88">
  <td>
    <b><font size="4">
  	$item.attr1
  	$!item.attr2
  	$!item.attr3
  	$!item.attr4
  	$!item.attr5
  	$!item.product.name
    </font></b>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
    <font size="3"><i>$product.name</i></font>
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
  #if ($quantity.intValue() <= 0)
      <font color="RED" size="2"><i>Back ordered.</i></font>
  #else
      <font size="2">$quantity.intValue() in stock.</font>
  #end
  </td></tr>
  <tr bgcolor="#FFFF88"><td>
    $fmt.formatNumber($item.listPrice, '$#,##0.00')
  </td></tr>
  
  <tr bgcolor="#FFFF88"><td>
  <a href="addItemToCart.do?itemId=$item.itemId" >
    <img border="0" src="images/button_add_to_cart.gif" /></a>
  </td></tr>
  </table>
  
  </p>
  #parse ("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/Product.vm
  
  Index: Product.vm
  ===================================================================
  #*
    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.
  *#
  #parse("view/velocity/IncludeTop.vm")
  
  
  <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  <tr><td bgcolor="#FFFF88">
  <a href="viewCategory.do?categoryId=$product.category"> <b><font color="BLACK"
size="2">&lt;&lt; $product.category</font></b></a>
  </td></tr>
  </table>
  
  <p>
  
  <center>
    <b><font size="4">$product.name</font></b>
  </center>
  
  <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="3">
    <tr bgcolor="#CCCCCC">  <td><b>Item ID</b></td>  <td><b>Product
ID</b></td>  <td><b>Description</b></td>  <td><b>List
Price</b></td>  <td> </td>  </tr>
  #foreach ($item in $itemList)
    <tr bgcolor="#FFFF88">
    <td><b>
  
   <a href="viewItem.do?itemId=$item.itemId">
   $item.itemId</a></b></td>
    <td>$item.productId</td>
    <td>
       $item.attr1
       $!item.attr2
       $!item.attr3
       $!item.attr4
       $!item.attr5
       $product.name
     </td>
    <td>$fmt.formatNumber($item.listPrice, '$#,##0.00')</td>
    <td><a href="addItemToCart.do?itemId=$item.itemId">
    <img border="0" src="images/button_add_to_cart.gif" /></a></td>
    </tr>
  #end
    <tr><td>
  #if (!$firstPage)
      <a href="${continuation.id}.kont?page=previous"><font color="white"><B>&lt;&lt;
Prev</B></font></a>
  #end
  #if (!$lastPage)
      <a href="${continuation.id}.kont?page=next"><font color="white"><B>Next
&gt;&gt;</B></font></a>
  #end
    </td></tr>
  </table>
  </p>
  
  #parse("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/index.vm
  
  Index: index.vm
  ===================================================================
  #*
    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.
  *#
  #parse ("view/velocity/IncludeTop.vm")
  
  <table border="0" cellspacing="0" width="100%">
    <tbody>
    <tr>
      <td valign="top" width="100%">
  
        <table align="left" border="0" cellspacing="0" width="80%">
          <tbody>
          <tr>
            <td valign="top">
  
              <!-- SIDEBAR -->
  
              <table bgcolor="#FFFF88" border="0" cellspacing="0" cellpadding="5" width="200">
                <tbody>
        <tr>
        <td>
  #if (!$accountForm.signOn)
                <b><i><font size="2" color="BLACK">Welcome $accountForm.account.firstName!</font></i></b>
  #end
  
        </td>
        </tr>
  #foreach ($category in $categoryList)
                <tr>
                  <td>
                    <a href="viewCategory.do?categoryId=$category.catId">
                      <img border="0" src="images/${category.name.toLowerCase()}_icon.gif"
alt="$category.name"/>
                    </a>
                  </td>
                </tr>
  #end
                </tbody>
               </table>
  
             </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" /><area alt="Dogs" coords="60,250,130,320" href="viewCategory.do?categoryId=DOGS"
shape="RECT" /><area alt="Reptiles" coords="140,270,210,340" href="viewCategory.do?categoryId=REPTILES"
shape="RECT" /><area alt="Cats" coords="225,240,295,310" href="viewCategory.do?categoryId=CATS"
shape="RECT" /><area alt="Birds" coords="280,180,350,250" href="viewCategory.do?categoryId=BIRDS"
shape="RECT" /></map><img border="0" height="355" src="images/splash.gif" align="center"
usemap="#estoremap" width="350" /> </td></tr></tbody></table></td></tr>
  
          </tbody>
          </table>
  
  #parse("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/IncludeMyList.vm
  
  Index: IncludeMyList.vm
  ===================================================================
  #*
    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.
  *#
  #if ($myList)
  <p> </p>
  <table align="right" bgcolor="#008800" border="0" cellspacing="2" cellpadding="3">
    <tr bgcolor="#CCCCCC"><td>
  <font size="4"><b>Pet Favorites</b></font>
  <font size="2"><i><br />Shop for more of your <br />favorite pets
here.</i></font>
    </td></tr>
    <tr bgcolor="#FFFF88">
    <td>
  #foreach ($product in $myList) 
      <a href="viewProduct.do?productId=$product.productId">
          $product.name</a>
      <br />
      <font size="2">($product.productId")</font>
      <br />
  #end
    </td>
    </tr>
    <tr>
    <td>
  #if (!$accountForm.myListPage.firstPage)
      <a href="?page=previous"><font color="white"><B>&lt;&lt; Prev</B></font></a>
  #end
  #if (!$accountForm.myListPage.lastPage) {
      <a href="?page=next"><font color="white"><B>Next &gt;&gt;</B></font></a>
  #end
    </td>
    </tr>
  
  </table>
  #end
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/petstore/samples/view/velocity/SignonForm.vm
  
  Index: SignonForm.vm
  ===================================================================
  #*
    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.
  *#
  #parse ("view/velocity/IncludeTop.vm")
  
  <br clear="all" />
  <center><b><font color="RED">$message </font></b></center><br
clear="all" />
  
  <form action="${continuation.id}.kont" method="POST">
  
  
  
  
  
  
  
  <table align="center" border="0">
  <tr>
  <td colspan="2">Please enter your username and password.
  <br /> </td>
  </tr>
  <tr>
  <td>Username:</td>
  <td><input type="text" name="username" value="j2ee" /></td>
  </tr>
  <tr>
  <td>Password:</td>
  <td><input type="password" name="password" value="j2ee" /></td>
  </tr>
  <tr>
  <td> </td>
  <td><input type="image" border="0" src="images/button_submit.gif" name="update"
/></td>
  </tr>
  </table>
  </form>
  <center>
  <a href="${registerType}Account.do">
  <img border="0" src="images/button_register_now.gif" />
  </a>
  </center>
  
  
  #parse("view/velocity/IncludeBottom.vm")
  
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/velocity/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?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.
  -->
  
  <!--+
      | Velocity block samples sitemap
      |
      | CVS $Id: sitemap.xmap,v 1.1 2004/04/17 08:27:05 antonio Exp $
      +-->
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
  <!-- =========================== Views =================================== -->
  
    <map:views>
      <map:view from-label="content" name="content">
        <map:serialize type="xml"/>
      </map:view>
  
      <map:view from-label="content" name="pretty-content">
        <map:transform src="context://stylesheets/system/xml2html.xslt"/>
        <map:serialize type="html"/>
      </map:view>
  
      <map:view from-position="last" name="links">
        <map:serialize type="links"/>
      </map:view>
    </map:views>
  
  <!-- =========================== Pipelines ================================= -->
  
    <map:pipelines>
      <map:pipeline type="caching">
        <!-- list of samples -->
        <map:match pattern="">
          <map:generate src="samples.xml"/>
          <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
            <map:parameter name="contextPath" value="{request:contextPath}"/>
          </map:transform>
          <map:serialize/>
        </map:match>
  
        <!-- hello world -->
        <map:match pattern="hello.vm">
          <map:generate src="hello-page.vm"/>
          <map:transform src="context://samples/hello-world/style/xsl/page2itext.xsl"/>
          <map:serialize/>
        </map:match>
      </map:pipeline>
    </map:pipelines>
  </map:sitemap>
  
  
  
  1.1                  cocoon-2.1/src/blocks/velocity/samples/samples.xml
  
  Index: samples.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.
  -->
  <!-- CVS $Id -->
  <samples xmlns:xlink="http://www.w3.org/1999/xlink" name="Velocity Block Samples">
  
      <group name="Back">
          <sample name="Back" href="../..">to Cocoon Samples main page</sample>
          <sample name="Back" href="..">to Cocoon Blocks Samples main page</sample>
      </group>
  
      <group name="Simple Velocity examples">
          <sample name="Hello, world!" href="hello.pdf">
              The well-known hello.xml document rendered using Velocity.
          </sample>
      </group>
  
      <group name="Resources">
          <sample name="Velocity web site" href="http://jakarta.apache.org/velocity/">
              Velocity reference information
          </sample>
      </group>
  </samples>
  
  
  
  

Mime
View raw message