Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Adding link to browser bookmarks
Adding link to browser bookmarks [message #125238] Tue, 17 March 2009 11:17 Go to next message
Sergey N. Yashin is currently offline Sergey N. YashinFriend
Messages: 44
Registered: July 2009
Member
Hi!

Can i somehow add link to the browser bookmarks from RAP without creating
a custom widget ?

Thanks.
Re: Adding link to browser bookmarks [message #125420 is a reply to message #125238] Tue, 17 March 2009 19:33 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Sergey N.Yashin wrote:
> Hi!
>
> Can i somehow add link to the browser bookmarks from RAP without
> creating a custom widget ?
No, you would need to write a custom widget. Maybe someone from the
newsgroup has already done this and likes to share the code???

>
> Thanks.
>
>
Re: Adding link to browser bookmarks [message #125470 is a reply to message #125238] Wed, 18 March 2009 08:19 Go to previous message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi,

I haven't tried it but maybe you can do this by adding a PhaseListener
in the SelectionListener of your Button, e.g.:

final Display display = Display.getCurrent();
RWT.getLifeCycle().addPhaseListener(new PhaseListener(){

private static final long serialVersionUID = 0L;

public void beforePhase(final PhaseEvent event){
// do nothing
}

public void afterPhase(final PhaseEvent event){
if (display == Display.getCurrent()) {
try {
final HtmlResponseWriter writer =
ContextProvider.getStateInfo().getResponseWriter();
final String jsCode = "window.sidebar.addPanel('Your
app', urlToApp, '');";

writer.write(jsCode);
} catch (final Exception e) {
e.printStackTrace();
} finally {
RWT.getLifeCycle().removePhaseListener(this);
}
}
}

public PhaseId getPhaseId(){
return PhaseId.RENDER;
}
});
}


Regards,
Stefan.



Sergey N.Yashin schrieb:
> Hi!
>
> Can i somehow add link to the browser bookmarks from RAP without
> creating a custom widget ?
>
> Thanks.
>
>
Previous Topic:Copy to browser clipboard
Next Topic:JAAS set-up
Goto Forum:
  


Current Time: Tue Apr 23 14:22:43 GMT 2024

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

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

Back to the top