Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How not to cancel event in ChangeHandler

    Hi,
    I am trying to use a ComboBoxItem to have the following: a) interactive filtering of displayed values (of the value map) when typing and b) using the selected value to generate a report.
    Code:
    public void onChange(ChangeEvent event) {
      String selection = (String) event.getValue();
        if(valueMap.get(selection) != null) {
           requestReport(selection);
        } 
    }
    Without 'if' I get every typed letter as a report name, with 'if' the combobox does not react on key pressed, as if my handler consumed the event.
    There is the ChangeEvent.cancel() method to stop further event processing. How can the handler signal that the event should be processed further?

    Thanks

    #2
    It should be processed further unless you cancel the change (show complete code if you think something is not behaving to spec), however, for your use case you probably want Changed, not Change.

    Comment

    Working...
    X