Results 1 to 2 of 2

Thread: Multiple Window Support

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2014
    Posts
    20
    Answers
    2

    Default Answered: Multiple Window Support

    Hi,

    I would like to create a GWT application which contains 2 windows ( to maximize it in different screens).

    I found a related thread but with no real answer:
    http://code.google.com/p/google-web-.../detail?id=404

    Is there a way to accomplish this feature in GXT?

    Thank you

  2. I found a way to solve this problem.
    http://gwtinnewbrowser.blogspot.co.at/
    The
    main idea is to open the same entrypoint with the same url in a different window using jsni. Before opening the window you need to set an identifier in the "externalWindowValues". Every time the EntryPoint is called you need to analyse the "externalWindowValues". Doing this you can accomplish a fork.

    This is my EntryPoint implementation
    Code:
    public void onModuleLoad()
      {
        String values = WindowUtils.getExternalWindowValues();
        if(values == null || !values.startsWith( "type=mapWindow" )){
          RootLayoutPanel.get().add( new Label( "Main Window" ) );
    
    
          // create new window
          String url = WindowUtils.getWindowUrl();
          WindowUtils.setExternalWindowValues( "type=mapWindow" );
    
    
          Window.open( url, "Test", "location=0, status=0, scrollbars=0, menubar=0, directories=0, resizable=1" );
        }
        else
        {
          RootLayoutPanel.get().add( new Label( "Map Window ) );
        }
      }
    This implementation only supports a one way communication which is ok by me.

  3. #2
    Sencha Premium Member
    Join Date
    Jul 2014
    Posts
    20
    Answers
    2

    Default

    I found a way to solve this problem.
    http://gwtinnewbrowser.blogspot.co.at/
    The
    main idea is to open the same entrypoint with the same url in a different window using jsni. Before opening the window you need to set an identifier in the "externalWindowValues". Every time the EntryPoint is called you need to analyse the "externalWindowValues". Doing this you can accomplish a fork.

    This is my EntryPoint implementation
    Code:
    public void onModuleLoad()
      {
        String values = WindowUtils.getExternalWindowValues();
        if(values == null || !values.startsWith( "type=mapWindow" )){
          RootLayoutPanel.get().add( new Label( "Main Window" ) );
    
    
          // create new window
          String url = WindowUtils.getWindowUrl();
          WindowUtils.setExternalWindowValues( "type=mapWindow" );
    
    
          Window.open( url, "Test", "location=0, status=0, scrollbars=0, menubar=0, directories=0, resizable=1" );
        }
        else
        {
          RootLayoutPanel.get().add( new Label( "Map Window ) );
        }
      }
    This implementation only supports a one way communication which is ok by me.

Tags for this Thread

Posting Permissions

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