1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default bug with toolbar in b5?

    bug with toolbar in b5?


    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
    Attached Images

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    to enable slate theme you need to do a few extra things...

    1) add this right after the onmoduleload
    Code:
    		ThemeManager.register(Slate.SLATE);
    2) add this to the GWT.XML
    Code:
    	<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...??

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    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:

    Code:
    <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>
    Code:
    <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

  4. #4
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    comment/remove the google style sheets - you shouldn't need these and they might be causing the issue...
    Code:
          <inherits name='com.google.gwt.user.theme.standard.Standard'/>

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    OK, here is my updated .gwt.xml:

    Code:
    <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

  6. #6
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    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 ?

  7. #7
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    oh, and remove your style sheet - the marketing specific one...

  8. #8
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    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

    Quote Originally Posted by gslender View Post
    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 ?

  9. #9
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    What are you trying to do with themes?

    Take a look at GXT setDefaultTheme and switchTheme.

  10. #10
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    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.

Thread Participants: 2