| 
      
      
      From: Adam A. (JIRA) <no...@sp...> - 2010-01-21 00:57:12
       | 
| VLDocking integration broken
----------------------------
                 Key: RCP-626
                 URL: https://jira.springsource.org/browse/RCP-626
             Project: Spring Rich Client Project
          Issue Type: Bug
            Reporter: Adam Armistead
            Assignee: Lieven Doclo
In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Adam A. (JIRA) <no...@sp...> - 2010-01-21 01:13:04
       | 
| 
     [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Armistead updated RCP-626:
-------------------------------
    Attachment: RCP-626.patch
I removed the page listener and associated layout saving code in the VLDockingApplicationPageFactory as this was causing the desktop layout to be saved once for each page created.  Pages are saved when closed anyway.  Which works on a show page command and when closing the application.
I created a VLDockingApplicationWindowFactory and VLDockingApplicationWindow that interact with the VLDockingApplicationPage to load and save layouts and clear the docking desktop when a new page is shown.
I removed loading the initial layout from the createControl method in the VLDockingApplicationPage as this was attempting to layout floating dockables whose position is dependent on the main window before the docking desktop was added to the window.  This was pulled out and put in the loadInitialLayout method which is called from VLDockingApplicationWindow during a show page command AFTER the docking desktop is added to the main window.
To configure the VLDocking support the only thing that needs to be done differently is in the ApplicationContext xml file you must specify a VLDockingApplicationWindowFactory bean and reference this with an idref tag in the application services.
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>         Attachments: RCP-626.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Rogan D. (JIRA) <no...@sp...> - 2010-01-21 15:48:04
       | 
| 
    [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50366#action_50366 ] 
Rogan Dawes commented on RCP-626:
---------------------------------
The code looks fine, although there are perhaps a few too many logging lines at info level.
You might also want to clear the floating dockables before calling super.showPage(), rather than after.
Finally, this seems unnecessary:
{quote}
+    // Saves the layout for the current page before displaying the new one.
+    if(oldPage instanceof VLDockingApplicationPage) {
+      ((VLDockingApplicationPage)oldPage).close();
+    }
{quote}
ApplicationPage specifies .close() anyway, so there is no need for the conditional and casting.
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>         Attachments: RCP-626.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Adam A. (JIRA) <no...@sp...> - 2010-01-21 16:17:04
       | 
| 
    [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50370#action_50370 ] 
Adam Armistead commented on RCP-626:
------------------------------------
There are only 2 logging lines at the info level in my code. One when an application window is created and one when an application page is created.  Should I get rid of both of them?
I will look into and test calling the close method to see why I did it that way.
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>         Attachments: RCP-626.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Rogan D. (JIRA) <no...@sp...> - 2010-01-21 16:28:04
       | 
| 
    [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50372#action_50372 ] 
Rogan Dawes commented on RCP-626:
---------------------------------
Well, maybe not remove, but maybe downgrade to debug or some lesser level?
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>         Attachments: RCP-626.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Adam A. (JIRA) <no...@sp...> - 2010-01-21 16:48:05
       | 
| 
    [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50373#action_50373 ] 
Adam Armistead commented on RCP-626:
------------------------------------
I have downgraded the logging lines to debug and am clearing the dockables before calling super.showPage().  As for calling oldPage.close() I will change the conditional to if(oldPage != null) which is probably more accurate and remove the casting.
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>         Attachments: RCP-626.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Adam A. (JIRA) <no...@sp...> - 2010-01-21 17:03:07
       | 
| 
     [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Armistead updated RCP-626:
-------------------------------
    Attachment: RCP-626_1.patch
Downgraded logger lines to debug, clearing docking desktop before calling super.showPage, changed conditional to check for null oldPage, and removed extraneous casting.
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>         Attachments: RCP-626.patch, RCP-626_1.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Adam A. (JIRA) <no...@sp...> - 2010-04-09 02:41:05
       | 
| 
    [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52805#action_52805 ] 
Adam Armistead commented on RCP-626:
------------------------------------
Ok, this is still broken.  If I open a view it gets created, if i close a view it goes away, but the Dockable is still registered with the DockingContext.  If I open a it again, it gets recreated and a duplicate Dockable gets added to the DockingContext, etc.  So if I open and close one dockable 10 times i have 10 registered with the DockingContext now.
First I tried to override the #findPageComponent(String) method.  In order to attempt to get the dockable we are looking for from the DockingContext if it wasn't found with the superclass implementation.  I could then #addPageComponent to add it to the list of page components for the page and #getLayoutManager().addDockable(desktop,getDockable(pageComponent)) to add the dockable to the desktop.  This seemed to work, until I added an initialLayout file, then my views createControl() method doesn't get called, hrm.
In the process I found that the default layout manager is calling #desktop.remove(Dockable).  This method doesn't unregister the dockable in the DockingContext, but close does.  So I tried changing that to use the close method. That results in views being destroyed when closed and recreated when opened again, instead of just "hidden" when closed, and "visible" when opened again.
I also tried changing my VLDockingApplicationWindow to unregister dockables when a new page is shown.
Anyway, I haven't found the solution yet, things seem to work either when I'm not using initialLayout files, or when I am, and sometimes break when switching between application pages, and sometimes not.  This became apparent when I wrote a more than trivial VLDockingLayoutManager as adding things to tabs and so on apparently works a bit differently than just throwing views on the desktop and it started throwing NPEs.
I'll keep working on it but if anyone gets sometime, help is always appreciated.
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>            Priority: Major
>         Attachments: RCP-626.patch, RCP-626_1.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 | 
| 
      
      
      From: Julio A. (J. <no...@sp...> - 2011-01-23 18:04:55
       | 
| 
    [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62642#action_62642 ] 
Julio Argüello commented on RCP-626:
------------------------------------
Take a look to Bluebell aproach, I finally got remove the memory leak.
http://saber.b2b2000.com/display/BLU...ng+memory+leak
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>            Priority: Major
>         Attachments: RCP-626.patch, RCP-626_1.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
       
 | 
| 
      
      
      From: Adam A. (JIRA) <no...@sp...> - 2011-01-24 18:25:29
       | 
| 
    [ https://jira.springsource.org/browse/RCP-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62693#action_62693 ] 
Adam Armistead commented on RCP-626:
------------------------------------
The link you provided says "Document not found".  If you have managed to get this to work and have gotten the VLDockingApplicationPageFactory to properly cache ApplicationPages when setReusePages() is set to true and recreate them when set to false while still managing proper registering with the VLDocking desktop for hidden, visible, and floating windows I'm all over it.  One of my problems was getting it to work with different ApplicationPages.  With and without initial layouts, with and without custom VLDockingLayout implementations, and with and without both where some were loaded when switching application pages, and some were loaded upon application startup. I could always get some of them to work, but never all of them.
> VLDocking integration broken
> ----------------------------
>
>                 Key: RCP-626
>                 URL: https://jira.springsource.org/browse/RCP-626
>             Project: Spring Rich Client Project
>          Issue Type: Bug
>            Reporter: Adam Armistead
>            Assignee: Lieven Doclo
>            Priority: Major
>         Attachments: RCP-626.patch, RCP-626_1.patch
>
>
> In the VLDocking integrations each application page is its own DockingDesktop instance.  Pages are not being saved and loaded correctly resulting in floating dockables remaining on screen after showing a new page that should not show the floating dockable as a view.  Floating dockables are not positioned correctly when a page is shown, and when closing a page it is saved once for each page created, so if you create 5 application pages and close one of them it is saved 5 times in a row.
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
        
 |