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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:33:24+00:00 2026-05-26T08:33:24+00:00

I am using DockLayoutPanel as my main panel. Dependent of the menu I click

  • 0

I am using DockLayoutPanel as my main panel.
Dependent of the menu I click I change the center-part of the DLP.
For example I change either to form1.ui.xml or to form2.ui.xml.
Both of these forms have a “marker” implemented to display an error message:

<g:HTMLPanel ui:field="messageblock"/>

I am following the MVP Pattern (I use EventBus for communication) and so far everything works great. The only thing I can’t figure out is how to replace the content of messageblock. Or to be more concret how to get access to messageblock from my MainPresenter. The main idea behind this stuff is to bundle the error-handling in one presenter…

I am looking for something like

final Panel panel = DockLayoutPanel.get("messageblock");
panel.add(subwidget);

I appreciate every hint…

  • 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-26T08:33:24+00:00Added an answer on May 26, 2026 at 8:33 am

    Here is the conclusion I came to. Maybe it helps someone else.
    It’s based on what Riley Lark recommended – Thanks to Riley btw.

    RegistrationPresenter here is responsible for the registration process and shows a registration form to the user. The error-message should be displayed as close as possible to the place where the error occurred.

    Without error http://www.mikemitterer.at/fileadmin/stacktrace_imagehosting/screenshot-778.jpg

    An error occurred:
    Error popped up http://www.mikemitterer.at/fileadmin/stacktrace_imagehosting/screenshot-780.jpg

    Here now a rough description how I implemented this behavior:

    public class RegistrationPresenter implements Presenter {
    
    public interface Display extends StatusDisplay, HasMessageBlock {
        Widget asWidget();
    
        void setData(RegistrationTO registration);
    }
    
    private final Display   display;
    private final EventBus  eventBus;
        ...
    

    as you can see it’s Display implements HasMessageBlock:

    public interface HasMessageBlock {
    void showMessage(Message message);
    
    void hideMessage();
        }
    

    There exists a UIBinder-Widget MessageBlock (MessageBlock.ui.xml + MessageBlock.java)
    (messageblock will be turned to invisible in it’s constructor)

        <g:HTMLPanel styleName="errorblock" ui:field="messageblock">
            <div id="errorMsg" class="flurid">
                <div class="row">
                    <div class="column width_15/16">
                        <h3><ui:msg key="errorblock.headline">An error occurred...</ui:msg></h3>
                    </div>
                    <div class="column orientation-right islink width_1/16">
                        <g:Image resource='{res.xgray}' ui:field="image" />
                    </div>
         ...
    

    The Registration-Widget now includes MessageBlock

    <g:HTMLPanel styleName="registration" ui:field="panel">
        <div class="uniForm maxgrid700">
            <h1>
                <ui:msg key="registration.headline">Registration</ui:msg>
            </h1>
            <c:MessageBlock ui:field="messageblock"/>
            <div class="ctrlHolder">
                <p class="label">
                    <em></em>
                    <ui:msg key="registration.name">Name:</ui:msg>
                </p>
         ...
    

    Now, if someone fires a Message

    eventbus.fireEvent(new MessageEvent(new MessageImpl(Message.MESSAGETYPE.ERROR, "Server Error Message")));
    

    every Presenter which has “HasMessageBlock” for it’s Display can process/display the message:

            eventBus.addHandler(MessageEvent.TYPE, new MessageEventHandler() {
    
            @Override
            public void execute(final MessageEvent event) {
                display.showMessage(event.getMessage());
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
I'm using the following code in gwt: <g:DockLayoutPanel unit='EM'> <g:north size='5'> <g:Label>www.wing-project.org</g:Label> </g:north> <g:west
I am trying to create a DockLayoutPanel using GWT. It should occupy the complete
I'm creating a web application using GWT. My base panel is a RootLayoutPanel and
Using VB6 I am using checkbox and combobox in a Form. When i click
Using Bootstrap's typeahead javascript plugin, I'm attempting to change the data-source attribute via jQuery's
I am using UiBinder and a DockLayoutPanel as shown below. I am adding a
Using this lovely example I am getting some funky results. What I have is:
Using htaccess I'm basically trying to forbid access to the page i.e http://example.com ,
Using online interfaces to a version control system is a nice way to have

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.