Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Reopening the workbench after it has been closed
Reopening the workbench after it has been closed [message #97056] Sat, 05 July 2008 08:19 Go to next message
Eclipse UserFriend
Originally posted by: s8424488.mail.inf.tu-dresden.de

Hello,

we habe a RAP application which is displaying a login dialog in our
entrypoint before giving the user access to the workbench.

Now we would like to have the ability to get back to this login dialog
again, once the user closes the workbench, so that another user can login
from the same browser window.

Simply putting a loop around the code in the entry point obviously doesn't
seem to do the trick.
Is there any way to achieve this?

Best regards,
Philipp.
Re: Reopening the workbench after it has been closed [message #97189 is a reply to message #97056] Mon, 07 July 2008 09:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Hi Philipp,

this would mean to restart the workbench, which is currently not
possible.
Please see the threads "IWorkbench#restart behaves like
IWorkbench#close" and "restart a workbench" for details.


Cheers,
Rüdiger

Philipp wrote:
> Hello,
>
> we habe a RAP application which is displaying a login dialog in our
> entrypoint before giving the user access to the workbench.
>
> Now we would like to have the ability to get back to this login dialog
> again, once the user closes the workbench, so that another user can
> login from the same browser window.
>
> Simply putting a loop around the code in the entry point obviously
> doesn't seem to do the trick.
> Is there any way to achieve this?
>
> Best regards,
> Philipp.
>
Re: Reopening the workbench after it has been closed [message #97462 is a reply to message #97189] Wed, 09 July 2008 21:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: s8424488.mail.inf.tu-dresden.de

Hi Rüdiger,

thank you for your response.

We have figured out the following workaround for our problem now:

After the workbench has been closed, we display a HTML-Page as described
in [1]. This HTML-Page just redirects the browser window to our
entrypoint. Quick, dirty, but does exactly what we need :-)

PlatformUI.createAndRunWorkbench(display, new WorbenchAdvisor());
// sorgt fuer den Reload, nachdem die Workbench geschlossen wurde:
Shell shell = new Shell(display, SWT.NONE);
shell.setMinimized(true);
Browser browser = new Browser(shell, SWT.NONE);
String page = "<html><body><script
type=\"text/JavaScript\">top.location.href=\""+url+"\"; </script></body></html>";
browser.setText(page);
shell.open();

Bye,
Philipp.

---

[1]
http://dev.eclipse.org/newslists/news.eclipse.technology.rap /msg02659.html



Rüdiger Herrmann wrote:

> Hi Philipp,

> this would mean to restart the workbench, which is currently not
> possible.
> Please see the threads "IWorkbench#restart behaves like
> IWorkbench#close" and "restart a workbench" for details.


> Cheers,
> Rüdiger

> Philipp wrote:
>> Hello,
>>
>> we habe a RAP application which is displaying a login dialog in our
>> entrypoint before giving the user access to the workbench.
>>
>> Now we would like to have the ability to get back to this login dialog
>> again, once the user closes the workbench, so that another user can
>> login from the same browser window.
>>
>> Simply putting a loop around the code in the entry point obviously
>> doesn't seem to do the trick.
>> Is there any way to achieve this?
>>
>> Best regards,
>> Philipp.
>>
Re: Reopening the workbench after it has been closed [message #97484 is a reply to message #97462] Thu, 10 July 2008 08:13 Go to previous message
Reinhold Bentele is currently offline Reinhold BenteleFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Philipp,

Philipp wrote
[...]
> String page = "<html><body><script
> type=\"text/JavaScript\">top.location.href=\""+url+"\"; </script></body></html>";
[...]

If you get into trouble with session timeouts consider the following
alternative for redirection:

String page = "<html><head><title>Session timed out</title>"
+ "<meta http-equiv=\"refresh\" content=\"3; url=" + entryUrl + "\">"
+ "</head><body><p>User logged out.<br>"
+ "Redirecting to login page in 3 seconds..."
+ "<p>If you are experiencing problems with the redirection please use "
+ "<a href=" + entryUrl + ">this direct link</a>."
+ "</body></html>";

That was necessary in our project because the user was redirected to the
login page while the session wasn't timed out completely (the parameter
for setMaxInactiveInterval can't be less than 1).

Bye - Reinhold.
Previous Topic:TableViewer Scroll-Bug
Next Topic:data-transfer to servlet
Goto Forum:
  


Current Time: Fri Apr 26 05:40:23 GMT 2024

Powered by FUDForum. Page generated in 0.03224 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top