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..

    How to create one UL menu similar to another

    how to overwrite css style in asp.net page?

    How to make a centered, responsive CSS circle within a Boostrap div?

    How can I make my Div box holder look like this inside with CSS?

    What to do to align text as shown in the image using HTML and CSS?

    How to draw rectangle on the website to highlight?

    How to make scroll bar permanently visible on Mac OS using CSS or jQuery

    Understanding how menus work in html5 and css3

    How to get the navigation element to have horizontal lines after each nav element in css

    How to only use jquery .css() on a specific media query?

    How to get Width of html control (in pixel ) from charaters contained by that control

    How to make Asp.net Gridview header and first column frezee?

    How to alternate HTML table row colors using JSP?

    How to draw the following shape using CSS3 [duplicate]

    How to show blocks for progressbar using CSS

    Increasing font size for links on hover changes background color size, how to stop this?

    How to combine slide-in panels with sticky header?

    how to center a box using blueprint css framework

    how to compute Facebook graph api cover offset_y to pixel?

    How would I go about setting a CSS gradient background in JavaScript?

    How to center div within col-md-12 in bootstrap

    How to get horizontal scrollbar to appear beneath content?

    Multiple Read more issue in css, how do i solve that?

    How to make sure the users see the new logo?

    how to change css content attribute of a list item

    CSS Flexbox: how to change the width of the element

    How to change Google Chrome Arabic default font in css?

    How set font-size in TinyMce

    How to make a CSS border for a dropdown menu?

    how to access the styles from CSS