Hi,
I am getting below error when I try to access getselectedrecord() in selectItem..
Code:
SelectItem item = new SelectItem();
DataSource locationDS = LocationGwtRpcDataSource.getInstance();
ListGridField type = new ListGridField("locationType");
type.setWidth(50);
ListGridField location = new ListGridField("name");
item.setWidth(200);
item.setOptionDataSource(locationDS);
item.setValueField("id");
item.setDisplayField("name");
item.setPickListWidth(350);
item.setPickListFields(type, location);
final ListGridField location = new ListGridField("locationName");
location.setEditorType(item);
location.setWidth(item.getWidth());
location.setCanEdit(true);
location.addEditorExitHandler(new EditorExitHandler(){
@Override
public void onEditorExit(EditorExitEvent event) {
if (event.getNewValue() != null) {
Object i = item.getSelectedRecord().getAttribute("id");
}
}
});
it is giving below error...Please let me know how to solve this.
com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
number: -2146827850
description: Object doesn't support this property or method
at com.smartgwt.client.widgets.form.fields.SelectItem.getSelectedRecord(Native Method)
at com.sikorsky.fmoc.client.composer.grid.AircraftHoursGrid$1.onEditorExit(AircraftHoursGrid.java:91)
at com.smartgwt.client.widgets.grid.events.EditorExitEvent.dispatch(EditorExitEvent.java:96)
at com.smartgwt.client.widgets.grid.events.EditorExitEvent.dispatch(EditorExitEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:189)
Thanks,
Steve.
I am getting below error when I try to access getselectedrecord() in selectItem..
Code:
SelectItem item = new SelectItem();
DataSource locationDS = LocationGwtRpcDataSource.getInstance();
ListGridField type = new ListGridField("locationType");
type.setWidth(50);
ListGridField location = new ListGridField("name");
item.setWidth(200);
item.setOptionDataSource(locationDS);
item.setValueField("id");
item.setDisplayField("name");
item.setPickListWidth(350);
item.setPickListFields(type, location);
final ListGridField location = new ListGridField("locationName");
location.setEditorType(item);
location.setWidth(item.getWidth());
location.setCanEdit(true);
location.addEditorExitHandler(new EditorExitHandler(){
@Override
public void onEditorExit(EditorExitEvent event) {
if (event.getNewValue() != null) {
Object i = item.getSelectedRecord().getAttribute("id");
}
}
});
it is giving below error...Please let me know how to solve this.
com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
number: -2146827850
description: Object doesn't support this property or method
at com.smartgwt.client.widgets.form.fields.SelectItem.getSelectedRecord(Native Method)
at com.sikorsky.fmoc.client.composer.grid.AircraftHoursGrid$1.onEditorExit(AircraftHoursGrid.java:91)
at com.smartgwt.client.widgets.grid.events.EditorExitEvent.dispatch(EditorExitEvent.java:96)
at com.smartgwt.client.widgets.grid.events.EditorExitEvent.dispatch(EditorExitEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:189)
Thanks,
Steve.
Comment