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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:17:26+00:00 2026-06-12T15:17:26+00:00

Forgive me if my question is too naive as I just started working with

  • 0

Forgive me if my question is too naive as I just started working with gwt.

I create a gwt module (let’s say Editor_A) which has a number of DataGrid, buttons, etc. It works fine in the web page.

Then I am about to create the 2nd gwt module Editor_B.

They will not be on the same page ever, however, Editor_B is very similar with Editor_A as it just has an extra table and a button.

Now of course, I don’t want to copy/paste code from Editor_A to Editor_B. Instead, I wish to reuse the code from Editor_A.

How can I do that?

How can I inherit from Editor_A and reuse most of its code with some modification to produce Editor_B?

  • 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-12T15:17:28+00:00Added an answer on June 12, 2026 at 3:17 pm

    This can solve your problem:
    You can create an additional Core module, which is responsible for your base custom widgets, Client-Side Utils etc. Then you should inherit Core module in your both modules. So in your case you can create Composite widget which is used by Editor_A, then in your latter module you can create your Editor_B by inheriting from Editor_A. And of course you can add some modifications to that from Editor_B class.

    If you are using they in the same module, you can create one BaseEditor which is Editor_A in your case. And then:

    public class Editor_B extends Editor_A{
        public Editor_B(){
          draw();
        }
    
        private void draw(){
       // here, add your extra table and button, to panel which're protected(public)
        }
    }
    

    Apart from Java Inheritance be sure to configure GWT modules in the appropriate way, else the GWT Java to Javascript compiler will not find the relevant classes. Do this by modifying the module XML configuration to be something like this:

    <module>
       <inherits name='com.google.gwt.user.User'/>
       <source path="widgets"/>
    </module>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Forgive if this question is silly. I just started reading the SugarCRM developer documentation
Forgive me if this question has been asked before but I am new to
Forgive me if this question is too silly. I am making a webpage on
Forgive the beginner question, but say I have an array: a = [1,2,3] And
Forgive this question for being a little subjective but if you're just looking at
Forgive the duplicate question. I'd like to see this solved in Emacs Lisp too,
I'm just starting out, so please forgive if this is a silly question. I'm
Greetings all and please forgive me if my question is too cheap. I have
Forgive me in advance if this question is a little too open-ended, but I've
Forgive me, I hope this question isn't too obvious, I'm a javascript noob. I

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.