Yes, there is a getTotal() method in LineItem.java. The calculateTotal() method sets its value:
  private void calculateTotal() {
    if (item != null && item.getListPrice() != null) {
      total = item.getListPrice().multiply(new BigDecimal(quantity));
    } else {
      total = null;
    }

Jeff Butler <[EMAIL PROTECTED]> wrote:
Is there a getTotal() method in LineItem.java?  Setting property to "total" implies there should be (JavaBeans 101 - this bean:write tag would never call the calculateTotal method).
 
Jeff Butler


 
On 3/24/06, Mike Wilson <[EMAIL PROTECTED]> wrote:
Hello,
 
I have this code toward the bottom of the ViewOrder.jsp(newOrder.shtml):
<td
><bean:write name="item" property="quantity"/></td >
<td><bean:write name="item" property="unitPrice" format= "$#,##0.00"/></td>
<td><bean:write name="item" property="total" format="$#, ##0.00"/></td>
 
The quantity and unitPrice are displaying, but I can't get the total to display. I checked the calculateTotal() function in the LineItem.java and it looks like it should be working. I'm assuming that this total should work the same as the cart total (which does work), so I'm stumped. Anyone have any ideas on it?
 
Thanks in advance,
MW

New Yahoo! Messenger with Voice. Call regul ar phones from your PC for low, low rates.



Blab-away for as little as 1ยข/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.

Reply via email to