We have recently upgraded from Smart GWT 4.0 to 4.1 and now face an issue with editable ListGrids: If there are ListGridFields with ListGridFieldType.TIME, the EditCompletionEvent that can be retrieved within an EditorExitHandler seems to have the wrong type in some cases. So far, using Smart GWT 4.0, the issue haven't occured.
The following sample code illustrates the problem:
For example, the following use cases produce the wrong type of EditCompletionEvent:
- Place the cursor into Field_2 editor and press Tab --> the expected output is "TAB_KEYPRESS"; however, the actual output is "CLICK_OUTSIDE".
- Place the cursor into Field_1 editor and press Shift+Tab --> the expected output is "SHIFT_TAB_KEYPRESS"; however, the actual output is "CLICK_OUTSIDE".
Please note that the issue only occurs if you set the ListGridFieldType to TIME. If you omit the type definition everything works as expected.
It is important for us to get the correct type of EditCompletionEvent, since we implemented different behavior depending on the type which is now not working properly any more. Therefore, we'd greatly appreciate your help.
-----
SmartClient Version:
v9.1p_2014-08-13/PowerEdition Deployment (built 2014-08-13)
Browsers:
Firefox 24.7.0 ESR
IE 11
The following sample code illustrates the problem:
Code:
ListGrid grid = new ListGrid();
grid.setCanEdit(true);
grid.setHeight(50);
grid.setWidth(250);
grid.addEditorExitHandler(new EditorExitHandler() {
@Override
public void onEditorExit(EditorExitEvent event) {
System.out.println(event.getEditCompletionEvent());
}
});
ListGridField field1 = new ListGridField("Field_1");
field1.setType(ListGridFieldType.TIME);
field1.setTimeFormatter(TimeDisplayFormat.TOSHORTPADDED24HOURTIME);
field1.setWidth("50%");
ListGridField field2 = new ListGridField("Field_2");
field2.setType(ListGridFieldType.TIME);
field2.setTimeFormatter(TimeDisplayFormat.TOSHORTPADDED24HOURTIME);
field2.setWidth("50%");
grid.setFields(field1, field2);
Record testData = new Record();
testData.setAttribute("Field_1", new Date());
testData.setAttribute("Field_2", new Date());
grid.setData(new Record[] { testData });
For example, the following use cases produce the wrong type of EditCompletionEvent:
- Place the cursor into Field_2 editor and press Tab --> the expected output is "TAB_KEYPRESS"; however, the actual output is "CLICK_OUTSIDE".
- Place the cursor into Field_1 editor and press Shift+Tab --> the expected output is "SHIFT_TAB_KEYPRESS"; however, the actual output is "CLICK_OUTSIDE".
Please note that the issue only occurs if you set the ListGridFieldType to TIME. If you omit the type definition everything works as expected.
It is important for us to get the correct type of EditCompletionEvent, since we implemented different behavior depending on the type which is now not working properly any more. Therefore, we'd greatly appreciate your help.
-----
SmartClient Version:
v9.1p_2014-08-13/PowerEdition Deployment (built 2014-08-13)
Browsers:
Firefox 24.7.0 ESR
IE 11