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

  • Home
  • SEARCH
  • 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 6045203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:05:56+00:00 2026-05-23T07:05:56+00:00

I created a widget that is a subclass of Composite and has a com.extjs.gxt.ui.client.widget.Viewport

  • 0

I created a widget that is a subclass of Composite and has a com.extjs.gxt.ui.client.widget.Viewport in it. Into this viewport I added my header component, a LayoutComponent (initially empty) and my footer component. I initialized the composite widget by calling initWidget at the end of the constructor that sets everything up … something like this (some code removed for readability):

public class MyComposite extends Composite {
    ... 

    public MyComposite(...) {
        viewport = new Viewport();
        viewport.add(new Header());

        content = new LayoutContainer();
        viewport.add(content);

        viewport.add(new Footer());

        initWidget(viewport);
    }

    public void show(Widget... widgets) {
        content.removeAll();
        for (Widget widget: widgets) content.add(widget);
    }
}

Then I add an instance of this to the RootPanel:

MyComposite myComposite = new MyComposite(...);
RootPanel.get("myComposite").add(myComposite);

And guess what… that works! I see it. The header shows, the footer shows, and the content is blank at this point. Good. Then I make the call to show and add stuff to it. Not exactly as follows but for example:

myComposite.show(new Label(...));

But nothing happens. The code does run, the add(…) method gets called from the show(…) method, there are no exceptions, but nothing (new) shows up. I don’t use a Label, but that is not the problem (verified, that works elsewhere). When I inspect the DOM in the browser, I see that there is a div for the content, like there was initially, but it remained empty (i.e. no body content).

What am I missing?

Thanks!

  • 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-23T07:05:56+00:00Added an answer on May 23, 2026 at 7:05 am

    First off, are you extending GWT Composite or GXT Composite? If it is the GXT type you will need to call initComponent() on the viewport (rather than initWidget) as described here: http://dev.sencha.com/deploy/gxtdocs/com/extjs/gxt/ui/client/widget/Composite.html

    Also, try adding the following line to the end of your show method:
    content.layout(true);

    This will force GXT to layour the contents of your LayoutContainer, and you should at least see the new elements added to the DOM. If they still don’t appear on the screen you need to change your Layout of your LayoutContainer.

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

Sidebar

Related Questions

I have a simple Widget that I've created using a ContentPart. The ContentPart has
The organization I work for has created a small flash widget that we're encouraging
I've created a Vista sidebar widget that uses jQuery to fetch XML and display
I want to create a tab/widget/thingymajiggy like the feedback-thing in this picture: That behaves
Hey all, I've created a widget that will essentially unlock a music track, providing
I've created a nice app widget that I could not find on the market,
I created an Android app widget that displays some text. By pressing on the
I'm new to wordpress development and created a widget that works fine, however I'm
I've created an widget that will display if you've not outstanding on a long
I able to use LocalizedResource.properties with uibinder. let say i have widget that created

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.