Announcement Announcement Module
No announcement yet.
How to open all tab views when application starts up using the TabbedApplicationPage? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to open all tab views when application starts up using the TabbedApplicationPage?

    I'm using TabbedApplicationPage and it works well, but I'd like to have all of the views opened when the app starts up. Does anyone know of a way to have all of the views opened in tabs when the app starts up as opposed to opening them one-by-one with the Show View command ?

  • #2

    maybe the following can help you out.

    <bean id="petclinicLifecycleAdvisor" class="...PetClinicLifecycleAdvisor">
    <property name="windowCommandBarDefinitions">
    <property name="startingPageId">

    <bean id="multipleViewsPageDescriptor" class="org.springframework.richclient.application. mdi.DesktopPageDescriptor">
    <property name="viewDescriptors">



    • #3
      tab activation

      Talking about tab dialogs, anyone know how to detect when a tab is becoming active? Is there anything like a method to override or an event to listen to in Spring RC that would detect that?

      Many thanks



      • #4
        tab activation

        You can register a PageComponentListener to an ApplicationPage. It's callbacks give you information about the visual state of the PageComponents in an ApplicationPage and thus the tabs in a TabbedApplicationPage.

        hope that helps


        • #5
          My hacky solution

          How do I get the actual instance of the TabbedApplicationPage when all that is supplied initially is the TabbedApplicationPageFactory class? I know the framework must call this factory to get the instance at some point, but I don't feel like searching through the source to figure out where just yet.

          I was able to accomplish the opening of all tabs, but in a very hacky manner.

          To make it work, I added these lines to the onWindowOpened() method in the LifeCycleAdvisor:


          The problem with this is that onWindowOpened() method is only called after the window has been made visible, so you can see the tabs being created after the app starts up. This is not a huge problem, but it looks a little weird. In the lifecycle advisor, window.getPage() seems to return null before the window is actually visible.

          My hack is working, so I'm happy. Users will be able to see all tabs when the app starts up.