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:!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 extend the border-top on my nav_bar class

    How to set image in horizontal center of DIV to fill page width?

    how to adjust width of first cell of a table using CSS

    How to know which CSS style is applied and from where (javascript)?

    How do I add curved corners to menu in css

    How to make a visible rectangular frame in CSS to contain some sections of my view?

    How to change css properties on hover parent element?

    How to make the header part of the site as low as the logo?

    How does the CSS position on a div affects position of sibling division?

    How to crop Google GeoChart and center its content?

    How to reveal a Text Field on a form when the Select shows 'Other' using just CSS

    How to make a header bar fold over the webpage css

    How do I absolutely position a relatively positioned element?

    How to increase Page Width with the Help of CSS?

    How to give slide down effect when hover?

    CSS: Image is stretched to square, how to crop it?

    How do you vertically align the body tag of an HTML document?

    How can i make infinite flowing background with only CSS?

    how to add background image to css3 arrow

    how to select a input using jquery

    jQuery UI Tooltip with Arrow, why/how does this code work?

    How to create a responsive top bar with CSS

    CSS - Superfish, how to float 4th level of dropdown

    Error: Dynamically fetching css from CDN with fallback to local copy, How to resolve?

    How to embed a font in website

    How to check if style ID contains certain css selectors?

    How do I prevent sliced images in the CSS background from sitting on each other?

    How to continue CSS list on new page?

    How to make the whole div clickable

    How to use CSS to shift my menu div to the right?