ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Wilson <mw9...@yahoo.com>
Subject Re: 'total' property on ViewOrder.jsp not displaying
Date Fri, 24 Mar 2006 18:03:55 GMT
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 <jeffgbutler@gmail.com> 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 <mw9378@yahoo.com> 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,


  New Yahoo! Messenger with Voice. Call regular 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.
View raw message