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 8395267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:15:23+00:00 2026-06-09T20:15:23+00:00

I’m using GWT 2.4, SmartGWT 3.0, GWTP 0.7. I mostly try to stick with

  • 0

I’m using GWT 2.4, SmartGWT 3.0, GWTP 0.7.

I mostly try to stick with SmartGWT widgets for my layout, but I’m trying to add a GWT widget (can be anything from a MapWidget to a ChartWidget from HighCharts or a GWT label) to a tab in the SmartGWT tabset. Then I get the following exception:

Caused by: java.lang.AssertionError: A widget that has an existing parent widget may not be added to the detach list

This only happens in Dev mode. In production the assertions have been turned off, and my widgets do show up, but it makes it impossible to debug in Dev mode. As I understand it is because I’m mixing SmartGWT and GWT widgets.

Before GWTP, I was able to make this work, because to show my UI I would call draw() on my root layout, which was a VLayout. Now that I’m using GWTP, it will show my layout for me when I fire the RevealRootContentEvent, and it will add the layout by calling RootPanel.get().add(...), which I think is the reason why I’m having these problems now. All my layouts are still in SmartGWT.

Has anyone experienced the same issues (in the same setup) and how can this be handled?

  • 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-06-09T20:15:25+00:00Added an answer on June 9, 2026 at 8:15 pm

    So I think I got to the bottom of my problem.

    I read this issue
    http://code.google.com/p/gwt-platform/issues/detail?id=127

    In one of the posts, it is shown how to create a custom RootPresenter. The RootPresenter also contains a RootView, where the aforementioned setInSlot method is placed, and by writing a custom view, it is possible to override that method, and make sure that draw() is invoked on SmartGWT layouts, rather than being added in RootPanel.get().add(...);

    My impl looks like this:

    public class CustomRootPresenter extends RootPresenter
    {
        public static final class CustomRootView extends RootView
        {
            @Override
            public void setInSlot(Object slot, Widget content)
            {
                if (content instanceof Layout)
                {
                    // clear
                    RootLayoutPanel.get().clear();
                    RootPanel.get().clear();
    
                    Layout layout = (Layout) content;
                    layout.draw();
                }
                else
                {
                    super.setInSlot(slot, content);
                }
            }
        }
    
        @Inject
        public CustomRootPresenter(EventBus eventBus, CustomRootView myRootView)
        {
            super(eventBus, myRootView);
        }
    }
    

    Remember to inject the custom root presenter in your GIN module:

    // don't use install, when using custom RootPresenter
    // install(new DefaultModule(ClientPlaceManager.class));
    
    bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
    bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class);
    bind(CustomRootPresenter.class).asEagerSingleton();
    bind(PlaceManager.class).to(ClientPlaceManager.class).in(Singleton.class);
    bind(GoogleAnalytics.class).to(GoogleAnalyticsImpl.class).in(Singleton.class);
    

    It definitely solved my problem with adding GWT widgets to SmartGWT layouts.

    Thanks to Jean-Michel Garcia for pushing me in the right direction! 🙂

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:

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.