extending Navigator.UriFragmentManager

Hi again,
ok, my problem is that I want to remove th eexclamation mark (!) from my urls. I read online that I need to extend Navigator.UriFragmentManager and override the [get|set]
State(). That is all fine. However, the Navigator.UriFragmentManager constructor expects a Page param which I am not sure where to get when I am passing an instance of my implementation to the Navigator. Or is UI.getPage() expected to be enough?
thanks in advance.


yes, UI.getPage() or Page.getCurrent() should work, as long as you are within the UI/Page instance you want your Navigator to attach to.


Alright, thanks a lot Tepp. One more question though. The constructor of Navigator that accepts a Navigator.UriFragmentManager also requires a ViewDisplay. Where do I get this?
Thanks again.

ViewDisplay is an interface that you need to implement yourself to actually add the view content somewhere in your component hierarchy. I think the simplest way is to add “implements ViewDisplay” to your UI class and then implement the single method of the interface in the UI implementation. In the implementation you could e.g. cast the View that comes as a parameter to a Component and set it as the UI’s content. Of course you will need a more complicated implementation if you want to have menus, toolbars etc which should be visible regardless of the view.


Hi again Tepi,
Well, I passed in null for the time being, and everything is showing fine but the url continues having exclamation marks.
I also tried as you suggested and left an empty implementation of the method, and I see things well in my app, but still ! is somehow being appended to my urls. Do you happen to have any idea about this?

Alright Tepi, I just wanted to let you know that what you said worked. The thing was that I was modifying the wrong navigator.
Thanks again.