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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:02:03+00:00 2026-06-10T17:02:03+00:00

Can anyone share a code snippet or direct me to some discussions as to

  • 0

Can anyone share a code snippet or direct me to some discussions as to how I can add/remove forms dynamically to a central panel, based on some event.

The forms need to be created dynamically at run time based on a event. The GXT documentation does not clearly mention about this, also i couldn’t get much help from the examples.

By using in the abc.html i am able to get a reference to that using RootPanel.get(“foo”) and add a form dynamically to that. However i feel this is not a good design and very restrictive.

I tried the following options too, but they do not work. I am probably missing out on some concepts… any help is appreciated.

Approach 1.

ContentPanel cp ... //available as a reference (design time)

addForm(....) {
    FormPanel fp = new Formpanel();
    ......
    cp.add(fp); 
}

Approach 2.

ContentPanel cp = new ContentPanel(); //design time
cp.setId("xyz");
.....

addForm() {
    FormPanel fp = new Formpanel();
    ......
    RootPanel.get("xyz").add(fp);
}
  • 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-10T17:02:04+00:00Added an answer on June 10, 2026 at 5:02 pm

    Actually, add a layout() method will solve this problem.

    ContentPanel cp ... //available as a reference (design time)
    
    addForm(....) {
        FormPanel fp = new Formpanel();
        ......
        cp.add(fp);
        **cp.layout();**
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone share some code snippet used to convert Speech to text in Java.
Can anyone share an efficient code snipper to daemonize a process in python?
Can anyone help? I have some code that is shared between 2 projects. The
Can anyone please share some java codes for getting started with google search api's.I
Can anyone share a link to sample (ASP).Net code that uses the new Oracle
I'm using Google Sites to share/store useful code snippets. Can anyone show me how
Can anyone share code (or point me to Android sample code) to help me
Can anyone share best practices for troubleshooting google anlytics code? Has anyone built a
I'm trying to remove a class, but it fails from some reason, can anyone
Can anyone share? Excel format is fine too.

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.