pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Adding $ symbol for each cell entry in a tableview
Date Mon, 22 Oct 2012 15:16:54 GMT
Hi all,
after some tests I think there is some problem in the row editor,
because it's true, for example if I use this (inside your example):

SamplePage.java
                tableData = new HashMap<String, Float>();
                    tableData.put(Integer.toString(i), new Float(i +
0.5));  // test
with this the first time currency symbol is show in any cell
(the same replacing Float with Integer)

first time:
CurrencyCellRenderer: cellData = 0.5
CurrencyCellRenderer: cellData instanceof Number = true
CurrencyCellRenderer: cellData = 1.5
CurrencyCellRenderer: cellData instanceof Number = true
CurrencyCellRenderer: cellData = 2.5
CurrencyCellRenderer: cellData instanceof Number = true
CurrencyCellRenderer: cellData = 3.5
CurrencyCellRenderer: cellData instanceof Number = true
CurrencyCellRenderer: cellData = 4.5
CurrencyCellRenderer: cellData instanceof Number = true
CurrencyCellRenderer: cellData = 5.5


but after editing a row, it disappears ... and cell contents are no
more instanceof Number .

Using this instead:
//                rowEditor.getCellEditors().put(Integer.toString(i),
textInput);
		rowEditor.getCellEditors().put(Integer.toString(i), null);
you are not able to edit cell contents, but the format of strings is
good even after the tentative edit.
And last, using a TextArea instead gives another result ...


Probably there is something in TableViewRowEditor to fix or to extend.

In the meantime you can try adding a custom version of row editor,
with support for currency columns.


A fix for this must go in 2.0.3.
But first I have to look at it  better ... at least if/how there is a
good workaround (could be to extend row editor).


Let's update,
Sandro

Mime
View raw message