I want to pass a variable to a page. I have 4 different buttons that have a ClickListener that navigates to the page, and I want also pass 4 possible different values. The first idea was using the URL:
localhost:8080/second-page?value=1
I try to find a way to get value from it, but nothing wants to work.
I try also a different way using the plug-in URL Parameter Mapping but return only null values.
Adding to @knoobie and @mikhail.21 comments, make sure to read about the Navigation Lifecycle. Parameters are read/processed before the view itself is built and need to be saved to variables than can then be read from your constructor/initialization methods.