RE: Opening a SideBar (ShelfView) from an Action John Ormerod 22.Mar.08 01:02 PM Lotus Notes Application development All releasesAll platforms
Hi Debbie
One of those chance things, that led to another and another - which leads me to think there is a way to get hold of the Sidebar. You need to be using Personalities and have your personality sub-class of DefaultWorkbenchWindowAdvisor and be using the preWindowOpen() method.
Using content assist on 'super.' you can find methods like: getShelfExists(), getAllShelves().
I found that there were 2 ShelfPage instances called 'LEFT' and 'RIGHT'. I am using the left one, and I could see in the debugger that it was set to be 'true', but the right-hand one was' false'. I set the mode of the left-hand one to be ShelfPage.COLLAPSED, and I'm pleased to say it opened in collapsed mode. I assume that if I save a reference to this ShelfPage, then I can control it later from a push button.
If you search the User Guide for 'Hiding a sidebar' and then go to its parent topic 'Sidebar' you will find some stuff that is both helpful and unhelpful at the same time! However it does give you some background to hack your way round using the super. methods to work with the sidebars created by the Default personality.