Announcement Announcement Module
Collapse
No announcement yet.
Multiple views and pages question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple views and pages question

    Hi,

    I'm currently using the jide docking framework to implement multiple views per page. This is currently working and I'm trying to extend to have multiple pages, each with their own collection of views.

    I would like to implement a dynamic show view menu that only contains the views of the current page. In trying to implement this I see no way currently to obtain all the views for a page, or to tell if a view is included on a page. Anyone have an insight here? Thanks.

    By the way, once this is done we (with Tom Corbin and the JIDE guys) will release it for all to use.

    Jonny

  • #2
    This capability would likely need to be in the PageDescriptor object, which notes which ViewDescriptors it supports. I know there is a "showView" menu with the ability to open any view within a page, but you're right, there is no default way to say "this is the possible set of views for this page", and "here is the default layout for the page, with these views placed here and there" I think that is a good feature. Another good feature might be the ability to put views in groups, like eclipse does -- here are your Customer views, your Product views, your Order views, etc.

    Comment


    • #3
      Keith,

      thanks for the prompt reply. I just wanted to confirm that I wasn't missing anything already within the framework before I went ahead and implemented something myself.

      I see what you mean about the groups. My current application hasn't got that many, but I can see why you'd like them. Bit like the eclipse perspectives I guess. I'll keep that in mind while changing my current code.

      Jonny

      Originally posted by kdonald
      This capability would likely need to be in the PageDescriptor object, which notes which ViewDescriptors it supports. I know there is a "showView" menu with the ability to open any view within a page, but you're right, there is no default way to say "this is the possible set of views for this page", and "here is the default layout for the page, with these views placed here and there" I think that is a good feature. Another good feature might be the ability to put views in groups, like eclipse does -- here are your Customer views, your Product views, your Order views, etc.

      Comment


      • #4
        Will this help?

        I use this to locate a given view that I want my controlling view to get ahold of. My workspace has a table, and when a row is selected, detail information is filled in on 3 other views. In my application context, I just give the workspace view the names of the other views, which gets converted to a view descriptor. It's a bit clumsy, but works rather well.

        Code:
            public void setIncidentNoteViewDescriptor( ViewDescriptor  viewDescriptor )
            {
                _noteViewDescriptor = viewDescriptor;
            }
        Code:
            public AbstractView getView( ViewDescriptor     descriptor )
            {
                AbstractApplicationPage     page    = (AbstractApplicationPage) getActiveWindow().getPage();
                
                if ( logger.isInfoEnabled() )
                {
                    logger.info( "\n\t- view descriptor: [" + descriptor + "]"
                                 + "\n\t- views: [" + page.getPageComponents() + "]" );
                }
                
                Iterator        iter = page.getPageComponents().iterator();
                AbstractView    view;
                
                while ( iter.hasNext() )
                {
                    view = (AbstractView) iter.next();
                    
                    if ( view.getId().equals( descriptor.getId() ) )
                    {
                        return view;
                    }
                }
                
                return null;
            }

        Comment

        Working...
        X