jmix-projects / jmix-ui

DEPRECATED. Use https://github.com/jmix-framework/jmix
https://www.jmix.io
3 stars 7 forks source link

IllegalArgumentException in EntityPicker.removeAllActions method #730

Closed daring2 closed 2 years ago

daring2 commented 2 years ago

Steps to reproduce:

  1. Create a screen with entityPicker field.
  2. Call removeAllActions method for the field.

Result: IllegalArgumentException is thrown

Stacketrace:

Caused by: java.lang.IllegalArgumentException: Incorrect component type. Must be 'EntityPicker' or its inheritors
    at io.jmix.ui.component.EntityPicker$EntityPickerAction.setPicker(EntityPicker.java:74) ~[jmix-ui-1.1.0.jar:na]
    at io.jmix.ui.component.impl.ValuePickerImpl.removeAction(ValuePickerImpl.java:286) ~[jmix-ui-1.1.0.jar:na]
    at io.jmix.ui.component.impl.ValuePickerImpl.removeAllActions(ValuePickerImpl.java:302) ~[jmix-ui-1.1.0.jar:na]
...
lovtsovaik commented 2 years ago

For QA:

  1. Create a screen with entityPicker field
  2. Inject entityPicker field to controller
  3. Subscribe to init event
  4. In OnInit() call removeAllActions() method for the field
  5. Run the app
  6. Open the screen
reznikova21 commented 2 years ago

1.2.0-SNAPSHOT - verified