PDA

View Full Version : Persona Theme onLoad don't charged



lenex
30 Mar 2009, 1:46 AM
Hi I'm new of GXT so I have need of a bit help.

My problem: I' m not able to change the theme of the page when I load the application.
My set up:


.xml

<module>
<inherits name="com.google.gwt.user.User"/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name='com.extjs.gxt.desktop.WebDesktop'/>
<inherits name='com.extjs.gxt.themes.Themes'/>
<inherits name='com.extjs.gxt.ui.GXT'/>
<stylesheet src='ImageViewer.css' />
<entry-point class="com.mycompany.project.client.ImageViewer"/>
</module>


.html

<html>
<head>

<!-- -->
<!-- Any title is fine -->
<!-- -->
<title>Wrapper HTML for ImageViewer</title>

<!-- -->
<!-- The module reference below is the link -->
<!-- between html and your Web Toolkit module -->
<!-- -->
<meta name='gwt:module' content='com.mycompany.project.ImageViewer'/>

<!-- -->
<!-- Link CSS file -->
<!-- -->
<link rel="stylesheet" type="text/css" href="css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="css/xtheme-slate.css" />
<link type="text/css" rel='stylesheet' href='ImageViewer.css'/>

</head>

<!-- -->
<!-- The body can have arbitrary html, or -->
<!-- we leave the body empty because we want -->
<!-- to create a completely dynamic ui -->
<!-- -->
<body>

<!-- -->
<!-- This script is required bootstrap stuff. -->
<!-- You can put it in the HEAD, but startup -->
<!-- is slightly faster if you include it here. -->
<!-- -->
<script language="javascript" src="com.mycompany.project.ImageViewer.nocache.js"></script>

<!-- OPTIONAL: include this if you want history support -->
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>

</body>
</html>


.css


body {
background-color: white;
color: black;
font-family: Arial, sans-serif;
font-size: small;
margin: 5px;
}



Java code

public class ImageViewer implements EntryPoint {

public void onModuleLoad() {

GXT.init();
Theme mio=new Theme("My","my","ImageViewer.css");
GXT.setDefaultTheme(mio, true);
RootPanel.get().add(new Button("test"));
MessageBox.alert("test", "test", null);
}
}


I have not errors but when I load the page the color of the body page still to be blu.

I don't know why, can you help me, please?