Problem with getting url parameter in a controller after login

Hi jmix community, i’m having a problem with getting url paramater if user is not logged in.
If i’m not logged in and my url is ‘http://localhost:8081/items?nav=11’. After logging, in my ItemListView controller when i get current url by ‘VaadinService.getCurrentRequest().getHeader(“referer”)’ i only get ‘http://localhost:8081/login’. How can i get my ‘nav’ id parameter after log in?

Hi!

Have you tried processing the parameters according to the documentation: Opening Views :: Jmix Documentation ?

Could you provide the code for the ItemListView controller?

Regards,
Dmitriy

i tried to pass a query parameter in this way:

image

As you see, when i build navigations with AppListMenu class, i pass parameter by wrapping it to the BadgeMenuItem class

Hi,
did you find a solution for that?
I have the same issue…
When logged in I get the params,
when calling the view as anonymous, no params …
KR
Roland

I thought I got it… but I was wrong
it only works when you have been logged in once and then you can logout… it will still work.
but in a new browser session without any login I only get a null result

I also had to add @AnonymousAllowed

@AnonymousAllowed
@Subscribe
public void onQueryParametersChange(final QueryParametersChangeEvent event) {
List messageParams = event.getQueryParameters().getParameters().get(“name”);
if (messageParams != null && !messageParams.isEmpty())
System.out.println("params: " + messageParams.get(0));
}

home at last…

there was a typo…
The solution above works fine