260261262263264265266267268269270
@Override public void onCheckChange(CheckChangeEvent<CheckMenuItem> event) { // must pass true to cause value change event to fire b.setValue(event.getItem().isChecked(), true); b.fireEvent(new SelectEvent()); } }); menu.add(item);
263264265266267268269270271272273
item.addCheckChangeHandler(new CheckChangeHandler<CheckMenuItem>() { @Override public void onCheckChange(CheckChangeEvent<CheckMenuItem> event) { b.setValue(event.getItem().isChecked()); b.fireEvent(new SelectEvent()); } }); menu.add(item);