Override Page

Hi,

I can’t find an easy way to override the Page class. I’m not happy with the Page.updateLocation() method which compares fragments only but I want it to detect changes to the URL part (before #) as well when
@PreserveOnRefresh
is set. In fact, I want even more complex custom logic in this method.
Looking at the sources, the
page
field is private and is initialised in line. the code does not work if I just create my own field and override the getPage() method because the page field is accessed directly from the
paintContent()
method of the UI class. So, would it be possible to implemnt either:

  • create an overridable method (e.g.
    Page createPage()
    ) in UI which would be executed from the UI constructor instead of in line
    private Page page = new Page(this);
  • or to have a setPage(Page) method
  • or to change
    paintContent()
    so it would use getPage() instead of accessing the
    page
    private field

Or may be there is another way to detect updates to the URL (not just fragment) when @PreserveOnRefresh is set?

Thanks

Mikhail