google-code-export / tatami

Automatically exported from code.google.com/p/tatami
1 stars 1 forks source link

Error on grid width a specific DateFormatter #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Try this code :

Grid grid = new Grid();
grid.addColumn("BirthDate", "date", new 
DateFormatter(DateFormatter.displayDateOnly));
Object[] row1 = { new Date("03/25/1981") };
Object[] row2 = { new Date("11/12/1978") };
grid.addRow(row1);
grid.addRow(row2);

RootPanel.get().add(grid);

What is the expected output? What do you see instead?

Rows don't appear and I have a message 'Une erreur est survenue'

What version of the product are you using? On what operating system?

Tatami 1.3.1 / JDK 1.6.0_12 / Windows XP

Please provide any additional information below.

If I remove the DateFormatter, rows are OK

Original issue reported on code.google.com by yop...@gmail.com on 19 Feb 2009 at 11:50

GoogleCodeExporter commented 9 years ago
This still appears to be an issue on this Widget.

If I add a column into the grid like so:

DateFormatter dateFormatter = new 
DateFormatter(DateFormatter.displayTimeAndDate);
dateFormatter.setDatePattern("dd/mm/yyyy");
dateFormatter.setTimePattern("kk:mm:ss");

Cell dateColumn = transferResultsGrid.addColumn("Date", fieldlist.DATE, 100);
dateColumn.setFormatter(dateFormatter);

When my results come back from the Data store into the grid I every single cell 
just
has '...' as its data and I get the following error being thrown:

(TypeError): '$wnd.dojo.date.locale' is null or not an object
 number: -2146823281
 description: '$wnd.dojo.date.locale' is null or not an objectDate: Wed Sep 09
11:40:07 BST 
2009com.objetdirect.tatami.client.grid.Grid.delegateProcessRows(Native
Method)com.objetdirect.tatami.client.grid.Grid.onComplete(Grid.java:837)com.obje
tdirect.tatami.client.data.DataStorePaginator.notifyCompleteFetchListeners(DataS
torePaginator.java:232)com.objetdirect.tatami.client.data.DataStorePaginator.onC
omplete(DataStorePaginator.java:173)com.objetdirect.tatami.client.data.AbstractD
ataStore.notifyCompleteFetchListeners(AbstractDataStore.java:896)

I've attached a screen shot so you can see.

If I don't apply the formatter to the column the grid works as expected 
although with
the default date/time formatting applied to each cell

Original comment by iandgrat...@gmail.com on 9 Sep 2009 at 10:51

Attachments: