Navigator does not propagate parameters

Hi,

I have a complex application which contains a bunch of dialogs which are used all over the place. One of these dialogs is used to select an entity to be displayed in an edit-view. The database-id of the entity is transferred to the edit-view as an Navigation-parameter.

Now I got the requirement to insert a button in this edit-view, which allows the user to open the seletion-dialog in order to open the next entity to edit. Unfortunately, if you are telling Navigator to navigateTo() to the view already displayed and just change the parameters, those parameters are never propagated towards the view - so no displaying of the new entity.

Navigator only updates its internal state. As I am not using the default StateManager (I am working in a portal-environment), I cannot use the workaround suggested in this stackoverflow-post: http://stackoverflow.com/questions/38423836/vaadin-7-and-browser-url-update

Is there any other way around this
weird behaviour

bug
weird behaviour?

// set navigator to replace content area instead of whole page and thus keep menu
Navigator navigator = new Navigator(ui, new SessionNavigationStateManager(),
    new ComponentContainerViewDisplay(ui.getContentLayout())) {

        // Vaadin-Navigator does not propagate simple parameter-changes
        // to the view if the requested view is already displayed. This
        // bug needs this ugly workaround. - DemT, 14.12.16
        @Override
        protected void updateNavigationState(ViewChangeEvent event) {
            final boolean onlyParametersChanged = SharedUtil
                .equals(event.getNewView(), event.getOldView());
                        
            super.updateNavigationState(event);
                        
            if(onlyParametersChanged) {
                 event.getNewView().enter(event);
            }
        }
    };

Just wanted to share my current solution for this problem.