PDA

View Full Version : bug with toolbar in b5?



mwaschkowski
14 Jun 2008, 10:57 AM
I copied the code verbatim from the http://extjs.com/explorer/#toolbar-menu example and the theme dropdown box is not rendering properly on my system. As well, there is no slate option. I have double checked my config and everything looks fine (.gwt.xml and host html are setup as specified in the setup.txt file), but output is 'off', please see image.

Any suggestions?

Thanks,

Mark

gslender
14 Jun 2008, 3:31 PM
to enable slate theme you need to do a few extra things...

1) add this right after the onmoduleload

ThemeManager.register(Slate.SLATE);

2) add this to the GWT.XML

<inherits name='com.extjs.gxt.themes.Themes' />

for the other issue you will need to post some code as obviously when everything is setup correctly, it all works fine so something must be wrong - what about the HTML (including CSS??) or project settings...??

mwaschkowski
14 Jun 2008, 5:50 PM
OK, now see the slate option - thanks!

The dropdown is still not looking correct, see below for some of the details for my brand new project:


<module>

<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>

<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<!-- <inherits name="com.google.gwt.user.theme.chrome.Chrome"/> -->
<!-- <inherits name="com.google.gwt.user.theme.dark.Dark"/> -->

<!-- Other module inherits -->

<inherits name='com.extjs.gxt.ui.GXT'/>
<inherits name='com.extjs.gxt.themes.Themes' />


<!-- Specify the app entry point class. -->
<entry-point class='com.circumail.client.MarketingApp'/>

<!-- Specify the application specific style sheet. -->
<stylesheet src='MarketingApp.css' />

</module>


<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- -->
<!-- Any title is fine -->
<!-- -->
<title>MarketingApp</title>

<link rel="stylesheet" type="text/css" href="css/ext-all.css" />

<!-- -->
<!-- This script loads your compiled module. -->
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script type="text/javascript" language="javascript" src="com.circumail.MarketingApp.nocache.js"></script>

</head>

<!-- -->
<!-- The body can have arbitrary html, or -->
<!-- you can leave the body empty if you want -->
<!-- to create a completely dynamic UI. -->
<!-- -->
<body>

<!-- OPTIONAL: include this if you want history support -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>

</body>
</html>


Best,

Mark

gslender
14 Jun 2008, 7:42 PM
comment/remove the google style sheets - you shouldn't need these and they might be causing the issue...


<inherits name='com.google.gwt.user.theme.standard.Standard'/>

mwaschkowski
15 Jun 2008, 10:12 AM
OK, here is my updated .gwt.xml:



<module>

<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>

<!-- Other module inherits -->

<inherits name='com.extjs.gxt.ui.GXT'/>
<inherits name='com.extjs.gxt.themes.Themes' />


<!-- Specify the app entry point class. -->
<entry-point class='com.circumail.client.MarketingApp'/>

<!-- Specify the application specific style sheet. -->
<stylesheet src='MarketingApp.css' />

</module>


I replace my entry point with the one from the example, and I change the name of the entry point, thats it!

Its a new project, so the only jars I have are:
gwt-user.jar (1.5.0RC1)
gxt.jar (1.0B5)
jdk1.6

Everything runs with no errors/problems, so I'm assuming that my config is OK, but still it renders incorrectly. Anywhere else I should look?

Thanks,

Mark

gslender
15 Jun 2008, 12:55 PM
Mark,

Not really. This problem is very likely environmental as normally it would render fine.

How do the explorer examples (on ExtJS) render? http://extjs.com/products/gxt/download.php

Any problems?

The only other suggestion is to zip up your project and post as an attachment - we can then see if anything unusual is causing it.

BTW - what kind of OS and browser ?

gslender
15 Jun 2008, 12:56 PM
oh, and remove your style sheet - the marketing specific one...

mwaschkowski
16 Jun 2008, 4:26 AM
Hi!

Thanks a lot for the help.

The explorer examples render perfectly. I'm using Windows XP and running on the hosted mode in GWT.

I switched to do some dev on my laptop, and found some strange behavior. I didn't see the slate theme being applied :( So, I added the theme picker:

toolBar.add(new AdapterToolItem(new ThemeSelector()));

to my project again, then picked the theme, and THEN the slate theme was applied. I'm wondering what happens when you pick the slate theme from the ThemeSelector, it appears to work differently than just setting the theme on module load:

public void onModuleLoad() {
ThemeManager.register(Slate.SLATE);
...

which didn't appear to work on my laptop.

Any ideas? I'll zip up my project as a last resort only because that seems to be the most labor intensive for anyone that is going to help (which seems to be you so far gslender ;)

Cheers,

Mark


Mark,

Not really. This problem is very likely environmental as normally it would render fine.

How do the explorer examples (on ExtJS) render? http://extjs.com/products/gxt/download.php

Any problems?

The only other suggestion is to zip up your project and post as an attachment - we can then see if anything unusual is causing it.

BTW - what kind of OS and browser ?

darrellmeyer
17 Jun 2008, 6:15 AM
What are you trying to do with themes?

Take a look at GXT setDefaultTheme and switchTheme.

mwaschkowski
17 Jun 2008, 6:23 AM
Ya, I'll check the switchThemes method. Not sure but seemed to be different behavior after switchTheme was called, I'm wondering if something was cached...I'll look into on Friday.