Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
UriFragmentUtility does not change Uri
Hey everybody,
I´m new to vaadin and I´m trying to implement a history function with UriFragmentUtility.
I´ve a main window which extends the Window.class.
In my window I´ve:
private UriFragmentUtility fragmentUtility variable.
[indent][/indent]this.fragmentUtility = new UriFragmentUtility();
[indent][/indent]this.addComponent(this.fragmentUtility);
[indent][/indent]this.fragmentUtility.addListener(another Class = Sidemap);
And a function:
public void setNewFragment (String fragment){
[indent][/indent]this.fragmentUtility.setFragment(fragment);
}
In the Sidemap class(which is the listener) I implemented the function:
@Override
public void fragmentChanged(FragmentChangedEvent source) {
[indent][/indent]System.out.println("Event Fired:" + source.getUriFragmentUtility().getFragment());
}
When I start my application the log says:
Event Fired:test
Event Fired:
And the url does not add the fragment.
I don´t know, why there is a second log with an empty fragment. It seems that my fragment is replaced or deleted immediately.
When I´m calling the fragmentUtility.setFragment method during a button click event, everything works just fine(just one log, and the url changes)!
Where is my mistake? I just want to edit the fragment in my url, when I call my method setnewFragment..
I really hope that somebody can help me.
Greetings Basti
Hello I think, I have same issue in ff and chrome- vaadin 6.7.6 and 6.7.7
Edit:
sorry my mistake:
I called removeAllComponents and I frogot, that there is URIHelper too.
Everything is working for me.
PP