Hi,
SmartGwt Power build 17´th August 2014.
I have an editable grid where one of the fields is a integer that is localised, i.e the field type is localeInt.
When I change the value of the localeInt field to something illegal, i.e. a character, something breaks. I correctly get a validation error, however, I´m not able to change the incorrectly entered value.
I also get the following message in the development console:
Testcase:
Click new a couple of times to add a few records to the grid. Add integer values to the phone column. Then add something illegal as a phone number, i.e. a character 'a'. Try to change the value of 'a' back to a legal number.
If I change the FieldType to Integer, everything works fine. However I need the formatting provided by the localeInt type unfortunately.
Regards
Rolf
SmartGwt Power build 17´th August 2014.
I have an editable grid where one of the fields is a integer that is localised, i.e the field type is localeInt.
When I change the value of the localeInt field to something illegal, i.e. a character, something breaks. I correctly get a validation error, however, I´m not able to change the incorrectly entered value.
I also get the following message in the development console:
Code:
[ERROR] [test] - 14:39:01.840:IFCS6:WARN:ListGrid:isc_ListGrid_0:suppressing editorEnter handlers on focus as listGrid.$30a is null
Code:
public void onModuleLoad() { SC.showConsole(); VLayout l = new VLayout(); l.setWidth100(); final ListGrid grid = new ListGrid(); grid.setDataSource(new MyDS()); grid.setWidth100(); grid.setHeight(150); grid.setCanEdit(true); grid.setAutoFetchData(false); grid.setCanRemoveRecords(true); grid.setSaveLocally(true); grid.setAutoSaveEdits(false); grid.setEditEvent(ListGridEditEvent.CLICK); grid.setListEndEditAction(RowEndEditAction.NEXT); grid.setConfirmDiscardEdits(false); Button btn = new Button("New"); btn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { HashMap<String,String> newValues = new HashMap<String,String>(); newValues.put("name","Some name"); grid.startEditingNew(newValues); } }); l.addMember(grid); l.addMembers(btn); l.draw(); } class MyDS extends DataSource { public MyDS() { super("MYDS"); DataSourceIntegerField pkField = new DataSourceIntegerField("pk"); pkField.setHidden(true); pkField.setPrimaryKey(true); DataSourceField phone = new DataSourceField("phone", FieldType.LOCALEINT); DataSourceTextField name = new DataSourceTextField("name"); setFields(pkField,name,phone); setClientOnly(true); } }
If I change the FieldType to Integer, everything works fine. However I need the formatting provided by the localeInt type unfortunately.
Regards
Rolf
Comment