My code (files are all in the same directory):
1. Interface
package amdb.client.ui.table;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.CellTable.Resources;
public interface CellTableResource extends Resources {
public CellTable.Resources INSTANCE =
GWT.create(CellTableResource.class);
/**
* The styles used in this widget.
*/
@Source("CellTable.css")
CellTable.Style cellTableStyle();
}
2. CSS file (copy of the original CellTable style sheet, with "cellTable"
appended to every style).
.cellTable {
border: 1px solid #88b0f2;
}
.cellTableFirstColumn {
}
@sprite .cellTableFooter {
gwt-image: 'cellTableFooterBackground';
background-color: #b4d0f8;
border-top: 1px solid #88b0f2;
border-left: 1px solid #88b0f2;
border-right: 1px solid #eef;
padding: 0px 10px;
text-align: left;
color: #4b4a4a;
}
@sprite .cellTableHeader {
gwt-image: 'cellTableHeaderBackground';
background-color: #b4d0f8;
border-bottom: 1px solid #88b0f2;
border-left: 1px solid #88b0f2;
border-right: 1px solid #eef;
padding: 0px 10px;
text-align: left;
color: skyblue;
}
.cellTableCell {
padding: 4px 10px;
}
.cellTableFirstColumnFooter {
border-left: 0px;
}
.cellTableFirstColumnHeader {
border-left: 0px;
}
.cellTableEvenRow {
background-color: red;
}
.cellTableOddRow {
background-color: red;
}
.cellTableHoveredRow {
background-color: green;
}
@sprite .cellTableSelectedRow {
gwt-image: 'cellTableSelectedBackground';
background-color: #628cd5;
color: white;
height: auto;
overflow: auto;
}
3. Call
CellTable<T> itemTable = new CellTable<T>(Integer.MAX_VALUE,
CellTableResource.INSTANCE);
4. Error
[DEBUG] [amdb] - Rebinding amdb.client.ui.table.CellTableResource
[ERROR] [amdb] - Deferred binding failed for
'amdb.client.ui.table.CellTableResource'; expect subsequent failures
[DEBUG] [amdb] - Rebinding
com.google.gwt.dom.client.StyleInjector.StyleInjectorImpl
[WARN] [amdb] - For the following type(s), generated source was never
committed (did you forget to call commit()?)
[WARN] [amdb] -
amdb.client.ui.table.CellTableResource_default_InlineClientBundleGenerator
[ERROR] [amdb] - Unable to load module entry point class amdb.client.AmdbNew
(see associated exception for details)
[ERROR] [amdb] - Failed to load module 'amdb' from user agent 'Mozilla/5.0
(X11; U; Linux i686; en-US) AppleWebKit/534.10 (KHTML, like Gecko)
Chrome/8.0.552.224 Safari/534.10' at localhost:40471
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.