GWT- SingleSelectionModel celltable- how to change selected cell's CSS?


Tags: java,css,gwt,selection,celltable

Problem :

I have something like the cell table here:

http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellTable

but without this UI binder (not really sure what thats all about, my project does not use it)

Anyways, i need a way to edit the cell row selection CSS and cant find a way. Right now when i select a row it just outlines the row, i need a way to change the cells background color and edit this default behavior.

i know i can set the css for the table by using cellTable.setStyleName("mycssFile") but how do i set it for an individual cell row? I have no individual cell reference currently, and any reference i try to put in front of cellTable does not compile.



Solution :

When you construct a CellTable, it grabs the default ClientBundle implementation (See GWT ClientBundle for details), which adds the cellTableKeyboardSelectedRow CSS class name to the selected row. But ClientBundle obfuscates the class names, so it shows up as a strange alphanumeric name if you look at the source. That CSS class name is defined in CellTable.css, which is located in gwt-user.jar/com/google/gwt/user/cellview/client/CellTable.css.

If you don't like the way it looks, you can implement your own ClientBundle (or extend CellTable.Resources) and use this constructor to make your CellTable: public CellTable(int pageSize, Resources resources).


    CSS Howto..

    Using CSS or Java to Show or Hide Empty Content Area

    How to change extjs grid single cell background color depending on value changes?

    django render_to_response how to send special characters

    How to set link color inside GridView cell

    css how to make the button in the middle of this code [closed]

    How to get CSS font-weight to display?

    CSS: How to lay an image on top of a table

    How to access dynamic controls having same properties in the Javascript

    How to move elements inside the left column of a 2 column css grid above and below the main content area on collapse

    How do I script such that my panoramic image can be panned left and right up to its edges?

    How to centre a javascript element using inline css? [closed]

    How to position a CSS triangle using ::after?

    how to target individual elements in grails g:render

    How to remove CSS and JS from a certain content-type in Drupal 7

    How can I force each piece of a quadrant to inhabit only its fourth of the area (HTML/CSS)?

    How to Make Text Stay Inside Div?

    CSS Rotation and Styling - how to?

    how to align elements using css in angular typeahead

    How to set font style light?

    CSS: How to float 3 divs side by side for width:100% without messing up?

    how to get background image present in other folder using css?

    CSS3 Keyframes how to make a image circle run without moving

    How to use first-child?

    How to set original image for animate background image in css

    CSS: How to add classes to existing grid that allow skipping columns on the left side

    How to fix height respective screen resolution?

    Boostrap: How to “stick” a button over an image when re-sizing

    how to make jquery transition smoothly

    background image not shown in div elements in mobile jquery

    How to replace HTML text with images using CSS content cross browser