I'll look into it and get back to you.
Sanjiv
Sanjiv
Uncaught JavaScript exception [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.ComboBoxItem.getSelectedRecord(Native Method) at com.kreators.grassias.client.presenter.SalesInvoicePresenter$4.onChanged(SalesInvoicePresenter.java:109) at com.smartgwt.client.widgets.form.fields.events.ChangedEvent.dispatch(ChangedEvent.java:96) at com.smartgwt.client.widgets.form.fields.events.ChangedEvent.dispatch(ChangedEvent.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)] in http://localhost/grassias/grassias/hosted.html?grassias, line 8
itemComboBoxItem.addChangedHandler(new ChangedHandler(){
public void onChanged(ChangedEvent event){
itemComboBoxItem.getSelectedRecord();
}
});
transactionListGrid.getField("itemCode").setEditorType(itemComboBoxItem)
private ComboBoxItem createComboBoxItem() {
final ComboBoxItem comboBoxItem = new ComboBoxItem();
comboBoxItem.setOptionDataSource(ItemSupplyXmlDS.getInstance());
comboBoxItem.setFilterLocally(false);
comboBoxItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
//cannot call this method since "comboBoxItem" is a prototype instance to be applied to all records as the editor type
//ListGridRecord rec = comboBoxItem.getSelectedRecord();
//do this instead
ListGridRecord rec = new ComboBoxItem(event.getItem().getJsObj()).getSelectedRecord();
GWT.log("rec:" + rec, null);
}
});
return comboBoxItem;
}
Comment