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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:30:16+00:00 2026-06-12T22:30:16+00:00

Before asking a question i will shortly describe the context. I have a Widget

  • 0

Before asking a question i will shortly describe the context.
I have a Widget class which “outsources” ui implementation to a separate class (sth like below):

public class SimpleFilmWidget extends Composite implements FilmActivityControl {

    public static interface Ui {

        Panel getMainPanel();

        VoteWidget getVotePanel();

        InlineLabel getHaveNotSeenLabel();

        //...
    }

The actual widget class can get references to specific subfield widget/elements with use of the Ui class instance:

    Ui ui;

    public SimpleFilmWidget() {
        this(new DefaultUi());
    }

    public SimpleFilmWidget(Ui customUi) {

        assert customUi != null : "UI should not be null!!!";

        ui = customUi;

        initWidget(ui.getMainPanel());
    }

I provided the actual UI implementation with UiBinder that uses UiFactory for creation of another one complicated subwidget

class DefaultUi implements Ui {

    //...

    @UiFactory
    protected VoteWidget createVoteWidget(){

        return new VoteWidget(msg){

            @Override
            protected SetVoteEvent onSetVote(Star star, boolean fireEvents) {
                return clientWidget.onSetVote(super.onSetVote(star, fireEvents));
            }
        };
    }

And the question is:
When I provide the subclass of DefaultUi can the UiFactory method be overriden in a subclass not confusing UiBinder parser?

EDIT:

UiFactory method should not be overriden as uibinder sees both methods (the overridden and the overwriting) and becomes confused with two uifactories for the same type: [ERROR] Duplicate factory in class SimpleFilmWidget.DefaultUi for type VoteWidget

  • 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-12T22:30:19+00:00Added an answer on June 12, 2026 at 10:30 pm

    Conclusion:

    UiFactory method should not be overriden as uibinder sees both methods (the overridden and the overwriting) and becomes confused with two uifactories for the same type: [ERROR] Duplicate factory in class SimpleFilmWidget.DefaultUi for type VoteWidget.

    from comment to @Thomas Broyer:
    I suspect, it then calls the superclass’es UiFactory annotated method which is not what I want it to do. I left this issue, as workaround attitude is sufficing to me in this case.

    Thanks for Your interest anyway.

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

Sidebar

Related Questions

Before asking my question, let me explain the context. CONTEXT: I have a web
I'll explain a little before asking my question ... I've created numerous games which
Ok, I have done plenty of research on this topic before asking the question,
I need help with a select, but before asking the question, I will give
Foreword Before asking a question that probably will pretend to downvoting (as it seems
Before asking the question let me preface with the fact that I am new
Before asking a question, and before you all get mad because there are a
I searched before asking this question. I didn't find an answer probably because I
I searched SO before asking this question, I am completely new to this and
Before, I post a question here asking for advice on how to read and

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.