vaadin / portlet

Portlet support for Vaadin Flow
https://vaadin.com
Other
2 stars 3 forks source link

@InitMethod annotation doesn't work as expected #172

Open mehdi-vaadin opened 4 years ago

mehdi-vaadin commented 4 years ago

According to the Javadoc of @InitMethod annotation, I should be able to annotate a method with the following signature as my init method in my portlet class.

public void <methodName>(PortletConfig) throws PortletException

But, it doesn't work.

Actual behavior

The init method is not called.

Expected behavior

The init method should be called by the portlet container when it is being placed into service and the PortletConfig argument should be provided.

How to reproduce

Add the following piece of code to MyPortlet class in base-starter-flow-portlet.

    @InitMethod("MyPortlet1")
    @Override
    public void init(PortletConfig config) throws PortletException {
        super.init(config);
    }

You will see that after adding the portlet to a page and opening it, the init method won't be called.

Versions

Vaadin Portlet: 1.0.0.beta3 Pluto: 3.1.0 Vaadin: 14.2.0.alpha2