Menu

column format

Help
Mcdiel
2006-09-25
2012-10-09
  • Mcdiel

    Mcdiel - 2006-09-25

    Hi
    I need help in some problems. :-)
    I have a column and I'm using TotalTableDecorator but I don't know how add a color in the subtotal and fulltotal row.

    And I need 2 decimals in the part of fulltotal

    Example

    I have 4039.36000000003

    And I need 4039.36

    How can do that???

    Thanks

    Mcdiel

     
    • Bilal

      Bilal - 2006-11-16

      You can use a decorator to round your total to 2 decimal places:
      <display:column ..... decorator="<full name of the class>">

      Your decorator class will implement ColumnDecorator
      You will need to implement the following methd:
      public String decorate(Object obj)
      round obj to 2 decimal places and return it.

      Hope this hepls.
      B

       

Log in to post a comment.