how to open a new window with output of other file in GWT

19 views
Skip to first unread message

Ashish

unread,
Jun 30, 2011, 2:19:54 PM6/30/11
to Google Web Toolkit
Hi

I am facing one problem

I need to show a output of a file in a new window on onClickEvent.

First File
public class GTDWeb1 implements EntryPoint{

public void onModuleLoad() {
------------------
-----------------

--- here is onClick event----
}

}

----------------------------------------------------------------------------------------
Second File
public class GTDWeb2 extends SimplePanel{
public void onLoad() {
------------------
-----------------
}

}

Thers is one onClick Event in my first file as shown above. I need to
open a new window which should have output of second file (GTDWeb2).
is it possible in GWT ? I am new in GWT help me.

Please anyone help me, I need to solve this urgently....

Eric Metcalf

unread,
Jun 30, 2011, 5:05:29 PM6/30/11
to google-we...@googlegroups.com
There is a way to open a new window with results from a click, but it may not be the best solution for what you want.  What are you trying to display?

You will have the Anchor target set to "_blank" or similar.  In the Url you will need to provide the page you want and any parameters.  Something similar to http://127.0.0.1:8888/index.html#myPage!param1=value1. This will load your entire application in the new window.  Now you need to display GTDWeb2 by having your app see the page/parameters passed and display the appropriate page. Hopefully your using history and can just call History.getToken() to get the page/parameters.
Message has been deleted

Piro

unread,
Jul 1, 2011, 5:05:39 PM7/1/11
to Google Web Toolkit
You can also manually invoke Window.open(String,String,String)

On 30. Jún, 23:05 h., Eric Metcalf <emetcalf....@gmail.com> wrote:
> There is a way to open a new window with results from a click, but it may
> not be the best solution for what you want.  What are you trying to display?
>
> You will have the Anchor target set to "_blank" or similar.  In the Url you
> will need to provide the page you want and any parameters.  Something
> similar tohttp://127.0.0.1:8888/index.html#myPage!param1=value1. This will
Reply all
Reply to author
Forward
0 new messages