Friday, July 29, 2011

Reload the CSS of a cellTable ?

I have defined a CSS file to a cellTable :

     * The styles applied to the table.
    interface TableStyle extends CellTable.Style {
        String evenRow();

        String hoveredRow();

        String oddRow();

        String selectedRow();

     * The resources applied to the table.
    interface TableResources extends CellTable.Resources {
        TableStyle cellTableStyle();

I then create my cellTable with the following lines :

private CellTable<DemandeRechercheDTO> demandeTable;
CellTable.Resources resources = GWT.create(TableResources.class);
demandeTable = new CellTable<DemandeRechercheDTO>(PAGE_SIZE, resources);

In my CSS file, demandeCellTable.css, i have defined the following color for the column headers :

.cellTableSortedHeaderAscending {
  background: #F56600; /* orange */

.cellTableSortedHeaderDescending {
  background: #F56600; /* orange */

This works well : when i click on the header of a column, the column is sorted and the header color becomes orange.
The celltable has a default sort column :


The problem is that when i decided to leave the page where the celltable is located, to go to another screen or tab for example,
if i come back to the screen then the celltable is displayed again, sorted with the default column, but the column that was previously clicked to sort is the one that has an orange header.

In other words, the last colum header that was clicked is the one that remains orange.

So, does anyone know where the problem could be ?

Is there a way to clear the CSS style and / or reload it to the celltable ?

Thanks for helping.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

1 comment: