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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:14:11+00:00 2026-05-31T20:14:11+00:00

I am using GWTP. I did the nested presenter tutorial. But there is no

  • 0

I am using GWTP. I did the nested presenter tutorial. But there is no tutorial for the SAMPLE TAB application (the one with the admin tab appearing if you switch to the admin mode). Can somebody explain me the main concepts of this application ? Tkx.

  • 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-31T20:14:12+00:00Added an answer on May 31, 2026 at 8:14 pm

    Update: Update: Now you can download the workable sample Maven project from here: gwtp-sample-tab.zip

    I used the tabbed presenter feature successfully in my project (I found the sample code didn’t compile as well). I think the first thing is to make it work, and then learn it and feel the benefits gradually 🙂

    Here is the steps I did:

    1) Copy the following files

    BaseTab.java
    BaseTabPanel.java
    SimpleTab.java
    SimpleTabPanel.java
    SimpleTab.ui.xml
    SimpleTabPanel.ui.xml
    UiModule.java
    

    from the sample code to you project. For example, I copied to this package: com.widenhome.web.client.ui. Also please remember to configure UiModule in ClientGinjector class.

    2) Create a normal presenter (MyPresenter) via GWTP eclipse plugin

    3) Change EventBus import this in the presenter

    import com.google.web.bindery.event.shared.EventBus;
    

    4) Make sure the MyPresenterView.ui.xml has the following code or similar:

    <g:HTMLPanel>
      <npui:SimpleTabPanel ui:field="tabPanel" />
      <g:SimplePanel ui:field="contentPanel" />
    </g:HTMLPanel>
    

    5) Change the presenter to extend TabContainerPresenter instead of Presenter

    public class MyPresenter extends
        TabContainerPresenter<MyPresenter.MyView, MyPresenter.MyProxy>
    

    6) Define several variables in MyPresenter, or you can just copy/paste the following code:

    /**
     * This will be the event sent to our "unknown" child presenters, in order
     * for them to register their tabs.
     */
    @RequestTabs
    public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>();
    
    /**
     * Fired by child proxie's when their tab content is changed.
     */
    @ChangeTab
    public static final Type<ChangeTabHandler> TYPE_ChangeTab = new Type<ChangeTabHandler>();
    
    /**
     * Use this in leaf presenters, inside their {@link #revealInParent} method.
     */
    @ContentSlot
    public static final Type<RevealContentHandler<?>> TYPE_SetTabContent = new Type<RevealContentHandler<?>>();
    

    7) Change the constructor of MyPresenter to use the variables:

    @Inject
    public MyPresenter(final EventBus eventBus, final MyView view, final MyProxy proxy) {
        super(eventBus, view, proxy, TYPE_SetTabContent, TYPE_RequestTabs, TYPE_ChangeTab);
    }
    

    8) Now we can start to create tab presenters, (e.g MyFirstTabPresenter). Just create a normal presenter again via GWTP eclipse plugin

    9) In MyFirstTabPresenter, change MyProxy to let it ‘extends’ TabContentProxyPlace instead of ProxyPlace

    10) Create @TabInfo method, please see javadoc of @TabInfo annotation, you can also use other ways here. For example, I did this:

    @TabInfo(container = MyPresenter.class)
    static TabData getTabLabel(ClientGinjector ginjector) {
        return new TabDataBasic("My First Tab", 0);
    }
    

    11) In revealInParent() method of MyFirstTabPresenter class, please make sure it has the following code or similar:

    @Override
    protected void revealInParent() {
        RevealContentEvent.fire(this, MyPresenter.TYPE_SetTabContent, this);
    }
    

    That’s all related to Tabbed presenter configurations. Now you can add some logic to load some data to show in MyFirstPresenter’s view.

    I hope this can help you to start with GWTP Tabbed presenter, please let me know any issues you have, I will edit answer gradually and perfect it so that it can help more people to get started with it.

    BTW, I also posted this to my blog to help more people on this.

    Thanks,
    Jiakuan

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

Sidebar

Related Questions

I am developing a web application using gwt and gwtp. I can get a
Hello I am using GWTP for my application development. In the application I am
I am developing a GWT application using GWT, SmartGWT and GWTP. At the beginning
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
We are using GWT & GWTP with UiBinder and I want to use properties
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using jQuery, one can easily find out whether a particular element is visible using
I got a project using GWTP (which involves MVP separation, Gin and Dispatch), now

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.