How to control the external browser in which RAP is running [message #124564] |
Sat, 14 March 2009 00:14  |
Eclipse User |
|
|
|
Originally posted by: dead.deadic.yahoo.com.cn
Hello,
Before my rap runs in a external browser, I want to hide or close the
toolbar,menubarand other bars in that browser.And after I exit my rap,I want
the browser also exits.
I used these code to get id and wanted to close it
"
ID=PlatformUI.getWorkbench().getBrowserSupport().getExternal Browser().getId();
System.out.println(ID);
ExternalBrowser.close(ID); "
Sadly, ID was showing ( it is "org.eclipse.ui.externalBrowser"), browser
was still there;
there was no errors in clonsole.
what is problem , and how to realize ?
Best regards
Anluyel
|
|
|
|
|
Re: How to control the external browser in which RAP is running [message #124886 is a reply to message #124765] |
Mon, 16 March 2009 13:04  |
Eclipse User |
|
|
|
Hi,
ExternalBrowser lets you open and close a new browser window. It can not
be used to close the window that contains the RAP application. If you
want to do so, you probably need to write a custom widget that closes
the window via window.close().
Anyway, many browsers disallow closing the main window unless as an
immediate reaction on a user interaction (such as clicking a link). Let
us know when you come up with a working solution.
Regards, Ralf
>>> Before my rap runs in a external browser, I want to hide or close the
>>> toolbar,menubarand other bars in that browser.And after I exit my rap,I
> want
>>> the browser also exits.
>
>> I don't quite understand your use case. What do you mean with "my rap"?
>> Could you explain what you are trying to do?
>
>> Ralf
>
> "my rap" => he is talking about his rap application. He wants to close
> the browser when the rap app exits.
>
> I've got an simular request; I want to tell the browser to reload the
> side when the rap app exits, exactly I want to restart(create a new
> session, old session info is not required any more) the rap session.
>
> How can i do that?
>
> thanks, best regards,
>
> p-lex
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04012 seconds