Navigator.navigateTo() should support query parameters
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Vaadin 8.4.5. Currently, telling Navigator to navigate to my?foo=bar will fail with
java.lang.IllegalArgumentException: Trying to navigate to an unknown state 'my?foo=bar' and an error view provider not present
at com.vaadin.navigator.Navigator.navigateTo(Navigator.java:661)
However, telling the browser to navigate to http://localhost:8080/my?foo=bar works and the foo query parameter is correctly shown in the query parameters as retrieved via Page.getCurrent().getLocation().getQuery().
Attempting to workaround this issue by navigating to my/?foo=bar will incorrectly add the ?foo=bar as a ViewChangeEvent.getParameters().
Please find the example application attached.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Navigator.java:661 and reproduce the failure with navigateTo("my?foo=bar"). Trace how the target state and query are parsed, then verify that the query is available through Page.getCurrent().getLocation().getQuery() without being included in ViewChangeEvent.getParameters().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100