jvanzyl 00/10/15 21:52:28
Modified: docs user-guide.html
Log:
- updated docs.
Revision Changes Path
1.4 +16 -19 jakarta-velocity/docs/user-guide.html
Index: user-guide.html
===================================================================
RCS file: /home/cvs/jakarta-velocity/docs/user-guide.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- user-guide.html 2000/10/16 03:13:29 1.3
+++ user-guide.html 2000/10/16 04:52:28 1.4
@@ -86,12 +86,10 @@
<P align="justify">
You meet with software engineers at your company, and everyone
- has agreed that the variable $name will hold the full name of the
- current customer, $customermud will list all
- the mud types that the logged in customer has ever purchased from your store,
- that $specialmud will be all the types mud on sale at present.
- The getPromo() method is used to get promotional information about the
- type of mud that appears in brackets.
+ has agreed that the variable $customer will hold information
+ pertaining to the customer currently logged in,
+ that $mudsOnSpecial will be all the types mud on sale at present.
+ The $flogger object contains methods that help with promotion.
For the task at hand, let's concern ourselves only with these three
variables. Remember, you don't need to worry about how the software
engineers extract the necessary information from the database, you just need
@@ -107,14 +105,15 @@
<DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD
bgcolor="#023264" height="1" width="1"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#023264"
height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0"
width="1"></TD><TD bgcolor="#023264" height="1" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#023264" width="1"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>
<HTML>
<BODY>
- Hello $name!
+ Hello $customer.Name!
<table>
- #foreach ($customermud in $specialmud)
- #if ($customermud)
- <tr><td>$getPromo($specialmud)</td><td>
- #else
- <tr><td>Click <a
href="specials.html#daily">here</a> for a list of our
- specials!</a></td></tr>
+ #foreach ($mud in $mudsOnSpecial)
+ #if ($customer.hasPurchased($mud))
+ <tr>
+ <td>
+ $flogger.getPromo($mud)
+ </td>
+ </tr>
#end
#end
</table>
@@ -128,10 +127,8 @@
penchant for Bright Red Mud logs in, and Bright Red Mud
is on sale, that is what this customer will see, prominently displayed.
If another customer with a long history of Terracotta Mud purchases logs in,
- the notice of a Terracotta Mud sale will be front and center. If a customer
- is not interested in any of the muds currently on sale, they will be
- invited to view a list of sale items. The flexibility of Velocity is
- enormous and limited only by your creativity.
+ the notice of a Terracotta Mud sale will be front and center.
+ The flexibility of Velocity is enormous and limited only by your creativity.
</P>
</FONT></TD></TR></TABLE></DIV><BR>
@@ -328,12 +325,12 @@
<P align="justify">
<DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD
bgcolor="#023264" height="1" width="1"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#023264"
height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0"
width="1"></TD><TD bgcolor="#023264" height="1" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#023264" width="1"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>
- $getTotalPrice("purchase")
+ $purchase.getTotalPrice()
</PRE></TD><TD bgcolor="#023264" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD
bgcolor="#023264" height="1" width="1"><IMG border="0" height="1" hspace="0"
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#023264"
height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0"
width="1"></TD><TD bgcolor="#023264" height="1" width="1"><IMG border="0" height="1"
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
</P>
<P align="justify">
- In this example, the $getTotalPrice() method, defined in the Java code,
+ In this example, the getTotalPrice() method, defined in the Java code,
will presumably return the total price of a purchase that is being tracked.
Note that this could also have been written,
$purchase.TotalPrice.