Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Button#setImage() doesn't update image dynamically
Button#setImage() doesn't update image dynamically [message #1759993] Fri, 21 April 2017 03:33 Go to next message
Manuel Mall is currently offline Manuel MallFriend
Messages: 26
Registered: September 2015
Junior Member
We are porting a sizeable RCP application to RAP and in a few places we are using Button#setImage() to dynamically change the appearance of the button. This doesn't seem to work in RAP and only the image set when the button was created is shown and subsequent setImage() calls have no visual effect.

Is there a way to make this work or is there a workaound available?

Thanks
Re: Button#setImage() doesn't update image dynamically [message #1760002 is a reply to message #1759993] Fri, 21 April 2017 06:54 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
please open a bugzilla a provide a snippet to demonstrate the problem. Changing Button image dynamically works as expected in our online Controls Demo [1].

[1] http://rap.eclipsesource.com/demo/release/controls/#Button
Regards,
Ivan
Re: Button#setImage() doesn't update image dynamically [message #1760037 is a reply to message #1760002] Fri, 21 April 2017 12:09 Go to previous messageGo to next message
Manuel Mall is currently offline Manuel MallFriend
Messages: 26
Registered: September 2015
Junior Member
Hi Ivan,

after further investigation it transpired that the problem was not the button but the creation of the image we were setting on the button. We were using a workaround for the not supported "new GC(image)" constructor and that workaround was flawed.

Let me take this opportunity to express my admiration for the capabilities of RAP. We have a very substantial RCP application with 80+ plugins relying heavily on the Eclipse extension mechanisms plus in depth use of SWT and Nebula controls. The amount of stuff that worked 'out-of-the-box' with RAP is amazing and blew some of my colleagues away who were pushing for a whole rewrite of the application into a web application.

We are trying hard to keep it single source for both RAP and RCP which is challenging at times but we worked through many of the issues by providing wrappers or adapters. Incomplete support for the Nebula Grid, especially row headers and cell selection, and no support for CDateTime forced some code rewrites. Of course the single Display assumption and the use of static or single instance classes which works just fine under a RCP desktop application needed work. Our biggest outstanding issue is how to make JFreeChart work under RAP and keep it interactive. Just generating a static image is not good enough.

On the 'outside of RAP' side we are also trying to find a solution how to integrate single sign on with OAuth2 into the Jetty/RAP combination. Note: We are running this as a standalone application server not as a WAR deployed into for example Tomcat.

Any way, thanks for all the work on this great piece of platform software.
Re: Button#setImage() doesn't update image dynamically [message #1760042 is a reply to message #1760037] Fri, 21 April 2017 12:22 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Thank you very much for the kind words. Such posts make as motivated to continue improving RAP.
Best regards,
Ivan
Previous Topic:How to localize and theme the context menu of an editor tab
Next Topic:Browser.setUrl() creates duplicate requests
Goto Forum:
  


Current Time: Thu Apr 25 04:10:20 GMT 2024

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

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

Back to the top