Results 1 to 2 of 2

Thread: Get View in active window

  1. #1
    Join Date
    Sep 2004
    Posts
    8

    Default Get View in active window

    Hi,
    How can i get view in active window if i use the newest spring-rcp?

    code if i used the previous version :
    Code:
            ApplicationAdvisor advisor = (ApplicationAdvisor)
            Application.services().getApplicationContext().getBean         ("applicationAdvisor");
            advisor.getStartingViewDescriptor().getDescription();           Application app = Application.instance();
            View  activeView = app.getActiveWindow().getView();        BindingView bindingView = (BindingView) activeView;
            bindingView.doAdd();
    Thx

    ulil

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Good point. For now, this will work:

    PageComponent component = window.getPage().getActiveComponent();

    You can cast the PageComponent to a View. I will most likely add a specific getActiveView and getActiveEditor method.
    Keith Donald
    Core Spring Development Team

Similar Threads

  1. No way to change title of active view?
    By adepue in forum Swing
    Replies: 17
    Last Post: Nov 1st, 2008, 08:43 AM
  2. Replies: 2
    Last Post: Mar 30th, 2007, 08:38 AM
  3. Replies: 9
    Last Post: Nov 1st, 2005, 10:36 PM
  4. Content Provider vs View Model
    By Martin Kersten in forum Swing
    Replies: 21
    Last Post: Mar 10th, 2005, 02:25 PM
  5. Questioning the core component
    By Martin Kersten in forum Swing
    Replies: 6
    Last Post: Feb 21st, 2005, 03:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •