Jan 19th, 2007, 10:32 AM
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
Jan 19th, 2007, 10:34 AM
By the way I'm using FlexDock 0.4.0.
Jan 20th, 2007, 09:58 AM
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.
Jan 22nd, 2007, 12:12 PM
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.
Jan 29th, 2007, 03:12 AM
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).