SmartGWT Power 2.5, GWT 2.4.
Firefox 6.0.
I have a ListGrid and one of its fields is a Date of Birth. Therefore, I have created the following piece of code.
When I test this, everything seems works fine. However when I click on the Year, which produces a list of years ranging from 1995-2015, I notice that I need a wider range of available dates.
So I saw that the DateItem object has a method, setStartDate(), that accepts a Date object and makes that its starting date.
Then I modified the above code to look like the following.
As a result when I click on the Year, I am able to see every year from 1969 - 2015 which is what I was expecting. However, when I select the Year for my "embarkDate" field, I receive the following error as well as the Year list shows up in the exact place of the dateOfBirth field instead of on the embarkDate field:
21:19:11.034 [ERROR] [mproject] 21:19:11.039:WARN:ButtonTable:isc_ButtonTable_0:ignoring bad or negative width: NaN [enable 'sizing' log for stack trace]
com.smartgwt.client.core.JsObject$SGWT_WARN: 21:19:11.039:WARN:ButtonTable:isc_ButtonTable_0:ignoring bad or negative width: NaN [enable 'sizing' log for stack trace]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:722)
Can anyone shed any light on this matter for me? am I doing something incorrectly? Thanks in advance.
Firefox 6.0.
I have a ListGrid and one of its fields is a Date of Birth. Therefore, I have created the following piece of code.
Code:
ListGridField dateOfBirth = new ListGridField("DateOfBirth"); dateOfBirth.setAlign(Alignment.CENTER); dob.setStartDate(new DateItem()); dateOfBirth.setRequired(true); ListGridField embarkDate = new ListGridField("EmbarkDate"); embarkDate.setAlign(Alignment.CENTER); embarkDate.setEditorType(new DateItem()); embarkDate.setRequired(true);
So I saw that the DateItem object has a method, setStartDate(), that accepts a Date object and makes that its starting date.
Then I modified the above code to look like the following.
Code:
ListGridField dateOfBirth = new ListGridField("DateOfBirth"); dateOfBirth.setAlign(Alignment.CENTER); dateOfBirth.setRequired(true); DateItem dob = new DateItem(); dob.setStartDate(new Date(0)); dateOfBirth.setEditorType(dob); ListGridField embarkDate = new ListGridField("EmbarkDate"); embarkDate.setAlign(Alignment.CENTER); embarkDate.setEditorType(new DateItem()); embarkDate.setRequired(true);
21:19:11.034 [ERROR] [mproject] 21:19:11.039:WARN:ButtonTable:isc_ButtonTable_0:ignoring bad or negative width: NaN [enable 'sizing' log for stack trace]
com.smartgwt.client.core.JsObject$SGWT_WARN: 21:19:11.039:WARN:ButtonTable:isc_ButtonTable_0:ignoring bad or negative width: NaN [enable 'sizing' log for stack trace]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:722)
Can anyone shed any light on this matter for me? am I doing something incorrectly? Thanks in advance.
Comment