Announcement Announcement Module
No announcement yet.
How to control view creation with flexdock Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to control view creation with flexdock


    Do someone know how can I control de location of a new View with FlexDock?

    I'm developing an application using Spring RCP 0.2.1 and the classes FlexDockApplicationPage, FlexDockApplicationPageFactory and FlexDockViewDescriptor.

    I had created the PerspectiveFactory to open two views on startup (on the left a view with a Tree Control and on the right a welcome View). My problem is that when I open a new View (using the options I provide with the Tree Control), it appears on the left Panel rather than on the right, so I need to know how to tell flexdock to open it where I want it. How can I do this?

    Thanks in advance
    Armando Alonzo

  • #2
    Flexdock version

    By the way I'm using FlexDock 0.4.0.


    • #3
      Actually I have that problem too and I've tried quite a few things but haven't found a solution.

      Currently I'm thinking that a solution is to open all views in the default perspective and then once the app is up and running close the ones I don't want. This way, if they are re-opened, they seem to "remember" where they were and the open again at that position. It is, however, a very crude solution.


      • #4
        By now I also had to leave all the views opened . I made some test in order to update dinamically the perspective inserting new DockState objects as the views were going to be opened but even thought the perspective gets reload It didn't work as I want it (the new view is sent to the back and can't be seen until you close the other views :S).

        I left it by now, but when I have more time I will work on it.


        • #5
          I asked in the flexdock forums and was instructed to use the following method:

          DockingManager.dock(dockable, dockable_parent, region, split_ratio);

          You can use the above to dock a dockable with respect to dockabe_parent. Of course you will need a way to define what the parent, region and split_ratio are for a new dockable (view) since you can't use the prespective factory (which is the place you typically define this stuff).