How to fire component event programatically

i need to fire ValueChangeEvent of CheckBox from code? But I don’t understand how to do this using the framework. I tried to do it like this:

UiControllerUtils.fireEvent(UiControllerUtils.getScreen(this), 
                            HasValue.ValueChangeEvent.class,
                            new HasValue.ValueChangeEvent((Component) customCheckBox,
                            customCheckBox.getValue(), Boolean.TRUE, false));

but this code does not work. Maybe someone knows how to do it?

Hello!

The UiControllerUtils.fireEvent() publish only screen events, it is not related with components.

I guess the simplest way is to use setValue() method. The EventHub which publish events is internal API of components.

oh, i see.