Monday, August 1, 2011

Re: Reload the CSS of a cellTable ?

anyone got an idea ?

On Fri, Jul 29, 2011 at 4:36 PM, Celinio <cel975@gmail.com> wrote:
hi,
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 {
        @Source("demandeCellTable.css")
        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 :

demandeTable.getColumnSortList().push(urgenceColumn);
demandeTable.getColumnSortList();

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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment