Hi folks,
Error: self.getSelectedRecord is not a function
Question: Why is not possible to call the method getSelectedRecord() from item (SelectItem) object ?!!!!
Thansk!
Code:
DataSourceField field = new DataSourceIntegerField ("valueInside", "Value Column"); field.setRequired (true); final SelectItem item = new SelectItem("itemID"); item.setTitle("Item"); item.setOptionDataSource(SupplyCategoryXmlDS.getInstance()); item.setValueField("categoryName"); item.setDisplayField("categoryName"); item.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { Object result = item.getSelectedRecord(); // Error here!!! - self.getSelectedRecord is not a function } }); field.setEditorType(item); addField (field);
Question: Why is not possible to call the method getSelectedRecord() from item (SelectItem) object ?!!!!
Thansk!
Comment