Announcement Announcement Module
No announcement yet.
VLDocking Load/Save ApplicationPage Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • VLDocking Load/Save ApplicationPage


    I am trying to load and save application pages with VLDocking. It seems everything works fine until I save a page that has floating docks. When I reload the application page after a save with a floating dock it doesn't appear where it last was and is no longer linked to the main window when you drag the main window around. I've been all through both the VLDocking code and the Spring Rich VLDocking support code and can't find where things are going wrong. Does anyone know how to fix this?


  • #2
    This is clearly an issue with RCP as I just tested everything with a regular java application and it works fine. Anyone have any hints?


    • #3
      This appears to be due to the fact that the dock views are created before the main window exists, as the floating docks are associated with the main window so that when the main window is dragged the floating docks move as well and when they are generated their location is relative to the main application window. Still not sure how to fix the problem though.


      • #4
        How does your saving code look?

        We have use this with some modifications to save/load the users window layout.


        • #5
          This looks like it was cut and pasted from VLDockingApplicationPage and VLDockingApplicationPageFactory classes. Putting this code in the lifecycleAdvisor after the same code has run during the creation of the application window probably works fine. From what I've found so far it looks like the problem is due to the fact that VLDockingApplicationPage.createControl() calls desktop.getContext().readXML(in) before the desktop has been added to the parent window, so the resolved dockables can't be placed correctly or associated with the JFrame. If i can't find a fix for the problem in the VLDocking Support classes I will just use this. If I can I'll create a JIRA issue and submit a patch so you won't have to add any of that to the lifecycleAdvisor, it'll just work that way during the creation of the application window. Thanks a bunch, this should solve my problem if i can't fix it in the docking support classes.


          • #6
            I created a JIRA issue and submitted a patch that fixes the loading and saving of VLDocking pages. If interested vote on it I guess. Haven't seen anyone importing patches in a while so don't know if it'll do any good.