Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@InitMethod annotation doesn't work as expected #172

Open
mehdi-vaadin opened this issue Jan 10, 2020 · 0 comments
Open

@InitMethod annotation doesn't work as expected #172

mehdi-vaadin opened this issue Jan 10, 2020 · 0 comments

Comments

@mehdi-vaadin
Copy link
Contributor

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

@mehdi-vaadin mehdi-vaadin added the bug Something isn't working label Jan 10, 2020
@pleku pleku added this to Needs triage in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) via automation Jan 8, 2021
@pleku pleku moved this from Needs triage to New P2 in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

2 participants