vaadin / vaadin/framework

ViewChangeEvent.getParameterMap() should include query parameters

Open
#10,596 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Vaadin 8.3. Since the addition of HTML5 History API the fragments has been abolished and REST-like paths are now being used. The query parameters were generally not used with the old fragment approach (since they are required to be present before fragment by the URL spec and that made the URLs look weird), but now they're back in the game.

However, the ViewChangeEvent.getParameterMap() still only returns the parameter map from the first path parameter. For example:

  • http://localhost:8080/myview/param1=value1 makes parameterMap return a map {param1=value1}; however
  • http://localhost:8080/myview?param1=value1 makes parameterMap return an empty map

I would suggest the parameterMap to actually return a union of path parameters and query parameters.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ViewChangeEvent.getParameterMap() and trace how path and query parameters are parsed for navigation events. Compare the path-parameter and query-parameter examples in the issue, then verify that the returned map contains the union of both kinds of parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.