User Tools

Site Tools


Pass Data from Handler to View

If you want to pass data from the handler to the view for processing during the @PostConstruct annotated method then you can add the data to the transient data map.

part.getTransientData().put(IServiceConstants.ACTIVE_SELECTION, selection);

In the @PostConstruct annotated method just inject the part as a parameter to the method and retrieve the data from the map.

public void postConstruct(MPart part, final Composite parent) {

    ITreeSelection selection = part.getTransientData().get(IServiceConstants.ACTIVE_SELECTION));

pass_data_from_handler_to_view.txt · Last modified: 2020/03/22 20:31 by mihael