Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Image path for favicon or splash screen(Images are not found.)
Image path for favicon or splash screen [message #1384922] Tue, 03 June 2014 07:37 Go to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Hi!

This code is not working:

public class BasicApplication implements ApplicationConfiguration {

    public void configure(Application application) {
    	Map<String, String> properties = new HashMap<String, String>();
        properties.put(WebClient.PAGE_TITLE, "Timerbee 2.0");
        application.addStyleSheet( "com.imilia.test.gui.fancy", "theme/fancy/fancy.css" );
        application.addStyleSheet( "com.imilia.test.gui.business", "theme/business/business.css" );
        application.addStyleSheet( "com.imilia.test.gui.my", "resource/theme/my.css" );
        properties.put( WebClient.THEME_ID, "com.imilia.test.gui.business" );
        properties.put( WebClient.BODY_HTML, "<p><img src=\"com/imilia/test/gui/timerbee.png\" alt=\"FAVICON\"></p>" );
        properties.put( WebClient.FAVICON, "com/imilia/test/gui/favicon.ico" );
        application.addEntryPoint("/hello", new E4EntryPointFactory(E4ApplicationConfig.create("platform:/plugin/com.imilia.test.gui/Application.e4xmi", "bundleclass://com.imilia.test.gui/com.imilia.test.gui.LoginLifcecycle")), properties);
        application.setOperationMode( OperationMode.SWT_COMPATIBILITY );
    }

}


The images are not found (timerbee.png, favicon.ico).
(They are at the classpath)

The image on the splash screen is shown as "?".
The favicon is throwing an exception:
java.lang.IllegalArgumentException: Resource does not exist: com/imilia/test/gui/favicon.ico
	at org.eclipse.rap.rwt.internal.resources.ResourceManagerImpl.getLocation(ResourceManagerImpl.java:105)
...


Is there a trick?

Greetings!

Thorsten
Re: Image path for favicon or splash screen [message #1384927 is a reply to message #1384922] Tue, 03 June 2014 07:50 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,
look at our Examples Demo [1]. You must add/register your image/icon
resources:
....
application.addResource( "icons/favicon.png", createResourceLoader(
"icons/favicon.png" ) );
....

[1]
http://git.eclipse.org/c/rap/org.eclipse.rap.git/tree/examples/org.eclipse.rap.examples/src/org/eclipse/rap/examples/internal/ExampleApplication.java
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Image path for favicon or splash screen [message #1384933 is a reply to message #1384927] Tue, 03 June 2014 08:13 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Thanx!

It works.
The prefix "./rwt-resources" is a little bit strange.
It's the path to the registered resources, isn't it?

Greetings!

Thorsten
Re: Image path for favicon or splash screen [message #1384934 is a reply to message #1384933] Tue, 03 June 2014 08:21 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,
yes... all resources in RAP are registered under "rwt-resources"
directory (see internal ResourceDirectory#DIRNAME).
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Image path for favicon or splash screen [message #1384937 is a reply to message #1384934] Tue, 03 June 2014 08:42 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
But isn't the splash screen supposed to disapear?
In my app it stays in the background.

Greetings!

T.
Re: Image path for favicon or splash screen [message #1384939 is a reply to message #1384937] Tue, 03 June 2014 08:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Could be a problem with my e4 boot process? Ivan, Do I need to make any
call to make the splash go down?

Tom

On 03.06.14 10:42, Thorsten Hilker wrote:
> But isn't the splash screen supposed to disapear?
> In my app it stays in the background.
>
> Greetings!
>
> T.
Re: Image path for favicon or splash screen [message #1384940 is a reply to message #1384937] Tue, 03 June 2014 08: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,
in the Examples Demo it stays behind the UI (main Shell). If you want to
hide it, you need to execute a script with JavaScriptExecutor client
service that hides the splash div.
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Image path for favicon or splash screen [message #1384942 is a reply to message #1384940] Tue, 03 June 2014 09:06 Go to previous message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Ahh, ok.

Thanx!
Previous Topic:[ANN] RAP 2.3RC2 available for download
Next Topic:Safari on IOS7 and ServerPush
Goto Forum:
  


Current Time: Tue Apr 23 11:06:49 GMT 2024

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

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

Back to the top