PDA

View Full Version : NO CSS STYLE



drenda81
5 Jul 2008, 8:49 AM
Hi all,
when I deploy a new project I'have to insert in my file.gwt.xml these rows in order to user EXT GWT:

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

It's correct? I have rendered a table but there is not css style or image applied to it :(

In my build folder in my root I'm finding:

-folder css (with ext-all.css,xtheme-gray.css,xtheme-slate.css)
-folder images>gxt
-file GwtExt.css in my root

I've forgotten something?? In my previous example with the folder resources of ext js the css styles was applied.

Thanks!

EvilTed
5 Jul 2008, 9:00 AM
Did you put the following in your HTML file?

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

It won't work without this.
You shouldn't need anything else.

HTH

ET

drenda81
5 Jul 2008, 4:25 PM
Hi EvilTel,
I've put the row in the html file but it doesn't work. I'have to copy the css directory into my WEBPage root and also in this case the layout is corrupted without image.

There are some directory to copy into the root of my new project?

Thanks!

drenda81
5 Jul 2008, 4:41 PM
Ok, maybe I solved the problem. I have to copy the folder css and images into my webfolder.
I have to say that I use Netbeans 6.1 for my projects.

This is a standard manner to resolve this problem?

Thanks

zaccret
7 Jul 2008, 10:43 PM
In my HTML file, I just have :

<link rel="stylesheet" type="text/css" href="css/ext-all.css" />
In my .gwt.xml file, I just have :

<!-- Inherit the Ext GWT. -->
<inherits name='com.extjs.gxt.ui.GXT'/>

drenda81
8 Jul 2008, 1:37 PM
Yes zaccret, I also have these settings in html file and .gwt.xml but I'had to copy the folders that I say in my previous post.

Strange....:-?

chrismcnally
18 Jul 2008, 9:16 AM
putting "css/ext-all.css" won't work for me since my JSP host pages are not loaded from the same directory as the GWT module files. I think this would be the case for many deployments that were not built from the ground up as a 100 percent GWT app.

so what you really need is the following:

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

Since the css is relative to your module file location.

I wonder why the sheet is not just included like this in the .gwt.xml file like this?

(from the GWT docs)

Including External Stylesheets

Stylesheet inclusion is a convenient way to automatically associate external CSS files with your module. Use the following syntax to cause a CSS file to be automatically attached to the host page.

<stylesheet src="_css-url_"/>

You can add any number of stylesheets this way, and the order of inclusion into the page reflects the order in which the elements appear in your module XML.

zaccret
21 Jul 2008, 12:06 AM
I think including the CSS in the .gwt.xml only work for hosted mode.