Recently, I became a part of a GWT application project which was initiated in 2009. My main task is to replace the FlexTable with a CellTable for its sortable column feature. Even though the current GWT version used in the project is 2.7.0, I noticed that some outdated features are still being utilized in the codebase. Being new to GWT, I might be mistaken in my observation.
The functionality of the project seems to be working well so far. However, I am facing challenges as GWT is not allowing me to update the CSS as desired. To resolve this issue, I referred to the GWT dynatablerf sample and tried to add custom CSS to the CellTable using the TimeSlotWidget as a reference:
interface TableResources extends CellTable.Resources {
@Override
@Source(value = {CellTable.Style.DEFAULT_CSS, "CellTablePatch.css"})
CellTable.Style cellTableStyle();
}
Following this, I implemented it in my code by initializing the CellTable like this:
table = new CellTable<TimeSlotListWidget.ScheduleRow>(ROWS_IN_A_DAY,
GWT.<TableResources> create(TableResources.class));
I attempted to customize the CSS further by creating a separate stylesheet inspired by the GWT CellTable.css. Interestingly, I observed that the TimeSlotListWidget sample includes a ui.xml file utilizing UIBinder, which is currently not integrated into my project.
Upon running my code, I noticed that there is a <style>
block injected into the page containing the standard GWT CellTable.css, followed by another <style>
block with my custom CSS. Unfortunately, my CSS changes do not override the default GWT styles.
I am puzzled about why the GWT CellTable.css is being inserted and how to prevent it from happening while ensuring my custom CSS takes precedence.