Get Value in V7

In platform V6, I have the code like this:

   statusOptionGroup.addValueChangeListener(e -> {
            loadPurchaseRequisition(e.getValue());

        });

Here “statusOptionGroup” is an Enum. I understand getValue() is part of breaking change. I am trying this way but it seems not a good one!
image

Any suggestions?

Hi,

I suppose that statusOptionGroup injected without the type, therefore you need to add the type, e.g.:

@Inject
private OptionGroup<Status, Status> statusOptionGroup

Regards,
Gleb

Thank you Gleb, I shall try it.
As OptionsGroup is deprecated, what component is replacing this?

RadioButtonGroup - for single select
CheckBoxGroup - for multi select