Hi guys, I’m afraid that I’m back with my stories of application level windows and URI fragments.
Thanks to you, the previous problems have been fixed, i.e. home page display before any page on direct access:
http://vaadin.com/forum/-/message_boards/message/57240
I use Vaadin 6.1-pre2 (but I don’t think it has any influence).
We see another (less annoying) problem:
- From any page, as for example http://localhost:8080/MyApplication#screenName
- I remove the anchor from the URL in the browser and press enter: http://localhost:8080/MyApplication
- Request 1 is sent: /UIDL/windowName=MainWindow&onunloadburst=1
- Request 2 is sent: /
- Request 3 is sent: /UIDL/repaintAll=1&…
- Request 4 is sent: /UIDL /
On the browser, just after:
Request 2 → after that, browser display is empty
Request 3 → after that, start page is shown again (screenName)
Request 4 → after that, home page (expected target) is displayed
The problem is: the current page turned blank, then redisplayed, then only the target page (home page) apprears. I’d prefer that the home page appears directly.
From a “non-home” page to a “non-home” page, it works nicely, for example between:
- http://localhost:8080/MyApplication#screenName1
- http://localhost:8080/MyApplication#screenName2
The problem happens only to or from the home page.
In the debugger, I traced request 1 and it closes the MainWindow (current application level window).
Isn’t that the root of the problem?
- AbstractApplicationServlet calls CommunicationManager.handleUidlRequest
- It calls CommunicationManager.handleVariables
- It detects a single variable: close = true with my MainWindow (application level window) instance as target.
- Window.changeVariables is called
- It detect the “close” variable and calls this.close().
I guess it causes the browser page to turn blank and the window to repaint itself. But I don’t really know in fact.
As a consequence (I guess), request 2 is fired and there, AbstractApplicationServlet calls writeAjaxPage method (with the following comment: // Send initial AJAX page that kickstarts a Vaadin application)
My question: is that an expected behaviour?
Many thanks.
John.