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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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