Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7247859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:03:43+00:00 2026-05-28T22:03:43+00:00

Upgrading from GWT 2.3 to 2.4 caused a client-side exception in a class of

  • 0

Upgrading from GWT 2.3 to 2.4 caused a client-side exception in a class of mine that extends CellTable. There has been no loss of functionality, but the exception is a constant development annoyance.

com.google.gwt.core.client.JavaScriptException: (TypeError): this.insertBefore is not a function

I’ve identified the line that causes this, though the exception doesn’t get thrown until the table is rendering later. In a row change handler, MyCellTable removes the header Element when there are no rows in the CellTable. Here’s some example code that causes the exception in 2.4, but not in 2.3.

CellTable<String> table = new CellTable<String>();

table.addColumn(new TextColumn<String>() {
        @Override
        public String getValue(String object) {
            return object;
        }
    }, "Col");

List<String> list = new ArrayList<String>();
list.add("abc");
list.add("def");
table.setRowData(list);

NodeList<Element> els = table.getElement().getElementsByTagName("THEAD");
if (els.getLength() == 0) {
    return;
}

final Element e = els.getItem(0);
e.removeFromParent();

Downgrading to GWT 2.3 fixes the problem. I tried calling headerElement.setAttribute(“style”, “display: none”) instead of removing the element, but that doesn’t look the same (it still keeps a few pixels there). I’m aware that creating a CellTable and then ripping out pieces of it is probably a bad practice.

Are there any known changes in GWT 2.4 that could be causing this problem? Can anyone think of a workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T22:03:44+00:00Added an answer on May 28, 2026 at 10:03 pm

    You can achieve the same result (hiding the header) by using the CSS property: “display: none” on the “thead” css attribute of the celltable.

    Here’s how:

    1. Create a css file with the following entry in it:

    Globalstyles.css:

        .hiddenHeader thead {
            display: none;
        }
    

    2. Add this file to a client resource bundle:

    GlobalResources.java

        public interface GlobalResources extends ClientBundle {
            public static final GlobalResources RESOURCE =  GWT.create(GlobalResources.class);
    
            @Source("GlobalStyles.css")
            GlobalStylesheet styles();
    
        }
    

    3. In your code, you can programatically set the style when there are no rows:

        cellTable.addStyleName(GlobalResources.RESOURCE.styles().hiddenHeader());
    

    And to remove the style call this:

        cellTable.removeStyleName(GlobalResources.RESOURCE.styles().hiddenHeader());
    

    Done!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am upgrading my project from GWT 2.3.0 to 2.4.0. As a side affect,
I'm upgrading from ColdFusion 8 to ColdFusion 9. I have a Java class that
Is it possible to prevent a newer SVN client (say 1.6) from automatically upgrading
Since upgrading from 4.7 to ECC6 the ABAP compiler has become a lot stricter
I have an app that I'm upgrading from some beta bits - and my
After upgrading from Firefox 3.6 to FF4 i was surprised to see that jQuery
When upgrading from Ruby 1.8.6 to Ruby Enterprise 1.8.7 p334, the memory size has
after upgrading from grails 1.3.7 to 2.0.1 i'm getting follwong strange exception when validating
I upgrading from django 1.1.1 to django 1.2.3, I know that CSRF feature have
After upgrading from Spring 3.0.0.M4 to 3.0.0.RC1 and Spring Security 3.0.0.M2 to 3.0.0.RC1, I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.