Hello,
I am using smartgwt-2.2 and in development mode when i set ListGridField type to FLOAT and use a CellFormatter, the chrome browser crashes with "Remote connection lost" (see error after the below code).
Note: All works fine after compilation
ListGridField transportationField = new ListGridField("transportation", "Transportation*");
transportationField.setType(ListGridFieldType.FLOAT);
transportationField.setCellFormatter(floatCellFormatter);
...
private class FloatCellFormatter implements CellFormatter {
@Override
public String format(Object value, ListGridRecord record, int rowNum,
int colNum) {
if (value == null)
return null;
NumberFormat nf = NumberFormat.getFormat("#,##0.00");
try {
return nf.format(((Number) value).floatValue());
} catch (Exception e) {
return value.toString();
}
}
}
Error:
18:46:48.250 [ERROR] [mcgbiometrics] Remote connection lost
com.google.gwt.dev.shell.BrowserChannel$RemoteDeathError: Remote connection lost
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1684)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at com.google.gwt.dev.shell.BrowserChannel$ReturnMessage.send(BrowserChannel.java:1341)
at com.google.gwt.dev.shell.BrowserChannel$ReturnMessage.send(BrowserChannel.java:1346)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1672)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
I am using smartgwt-2.2 and in development mode when i set ListGridField type to FLOAT and use a CellFormatter, the chrome browser crashes with "Remote connection lost" (see error after the below code).
Note: All works fine after compilation
ListGridField transportationField = new ListGridField("transportation", "Transportation*");
transportationField.setType(ListGridFieldType.FLOAT);
transportationField.setCellFormatter(floatCellFormatter);
...
private class FloatCellFormatter implements CellFormatter {
@Override
public String format(Object value, ListGridRecord record, int rowNum,
int colNum) {
if (value == null)
return null;
NumberFormat nf = NumberFormat.getFormat("#,##0.00");
try {
return nf.format(((Number) value).floatValue());
} catch (Exception e) {
return value.toString();
}
}
}
Error:
18:46:48.250 [ERROR] [mcgbiometrics] Remote connection lost
com.google.gwt.dev.shell.BrowserChannel$RemoteDeathError: Remote connection lost
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1684)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at com.google.gwt.dev.shell.BrowserChannel$ReturnMessage.send(BrowserChannel.java:1341)
at com.google.gwt.dev.shell.BrowserChannel$ReturnMessage.send(BrowserChannel.java:1346)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1672)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
Comment