Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » How to change theme(color)(Theme color, Error message after deploying the project, change the name which appears in browser)
How to change theme(color) [message #1061199] Thu, 30 May 2013 09:46 Go to next message
Shweta Tiwari is currently offline Shweta Tiwari
Messages: 10
Registered: February 2013
Junior Member
Hi,

I have made a scout project where I have few questions:

1. How can I change the theme color in scout eclipse(rap classic)?
2. How can I change the name which appears on the browser (for eg. My Application)?
3. After deploying my project, I am not able to get data automatically, I have to refresh the page. It gives the error "Search was cancelled. Please execute again". How can I get the data automatically.

I have attached the page with this mail.

Please help me in solving above questions.

Thanks in advance.

Regards,
Shweta Tiwari
Re: How to change theme(color) [message #1061206 is a reply to message #1061199] Thu, 30 May 2013 10:11 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 657
Registered: October 2011
Senior Member
Quote:
1. How can I change the theme color in scout eclipse(rap classic)?


In my opinion it is not recommended (*), but possible. Some people have done this. Have a look at the inputs from David Marx in the thread "Change Icon of checkable Table". It seems that you can achive a lot with CSS.

(*) I said not recommended, because I think that there is no API guarantee: some of your changes might be broken with a new version; you will have to maintain them by yourself. If you are OK with this, give it a try.


Quote:
2. How can I change the name which appears on the browser (for eg. My Application)?


I think you can change it in the plugin.xml file of the RAP Plugin (eg. /<your app>.ui.rap/plugin.xml)

    <branding
      body="web-resources/startup-body.html"
      favicon="web-resources/eclipseScout.gif"
      id="<your app>.ui.rap.branding.web"
      themeId="org.eclipse.scout.rt.ui.rap.theme"
      title="<your title>">
      <additionalHeaders>
        <link href="res/html-styles.css" rel="stylesheet"/>
      </additionalHeaders>
    </branding>


Quote:
3. After deploying my project, I am not able to get data automatically, I have to refresh the page. It gives the error "Search was cancelled. Please execute again". How can I get the data automatically.


I can not reproduce this. My small demo application (minicrm tutorial created with Scout 3.9.0 RC1) is working as expected.

> Do you have this in each of your table page?

> You speak from "deployed", this means you have build the war file? What is the behavior when you start your application from Eclipse (== with Jetty).

> What do you have in the logs?

> Have you an other UI (Swing or SWT) that you can use for comparison?

Re: How to change theme(color) [message #1061258 is a reply to message #1061206] Thu, 30 May 2013 16:15 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 126
Registered: March 2010
Senior Member
Hi there

To change the colors, paddings, borders etc. I suggest to create your own theme. You can use the scout default theme (called rayo) as template: http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/tree/org.eclipse.scout.rt.ui.rap.theme.rayo/theme/scout.css
or if you use the mobile client:
http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/tree/org.eclipse.scout.rt.ui.rap.theme.rayo.mobile/theme/scout.mobile.css

After creating your theme you have to activate it for your branding in the plugin.xml of your rap plugin. But as Jérémie already said, you may have to adjust it when updating to a new scout version.

To change the title of your application it is correct to do this by setting the title of the rap branding. But actually I would like to change it because it's not dynamic and it differs from swing and swt ui, where it can be set in the desktop class. So this may change in the future.

Regards
Claudio
Re: How to change theme(color) [message #1061297 is a reply to message #1061258] Fri, 31 May 2013 01:10 Go to previous messageGo to next message
Shweta Tiwari is currently offline Shweta Tiwari
Messages: 10
Registered: February 2013
Junior Member
Hi Jeremie,

Thanks a lot for your help. I have deployed project war to Tomcat. When I open RAP UI on the browser, I get the error "Search was cancelled. Please execute again" on the first page, there is no log generated for this. The page does not appear on its own, I have to refresh it then only it appears. If I come back to the same page again, it works perfectly fine. I didn't face any issue with jetty.

Kindly let me know if something can be done for this.

Thanks a tonne.

Regards,
Shweta Tiwari
Re: How to change theme(color) [message #1061299 is a reply to message #1061297] Fri, 31 May 2013 01:16 Go to previous message
Shweta Tiwari is currently offline Shweta Tiwari
Messages: 10
Registered: February 2013
Junior Member
Hi Claudio,

Thanks for the response. Currently I am working on rap classic, I am not using Rayo. If any option is there for RAP classic to change the theme please let me know.

Thanks and regards,
Shweta Tiwari
Previous Topic:Logout fails
Next Topic:scout eclipse features
Goto Forum:
  


Current Time: Thu Aug 21 12:11:11 EDT 2014

Powered by FUDForum. Page generated in 0.03813 seconds