This Forge-Plugin generates a complete GWT-Project based on MVP with UIBinder, Eventbus, Validation, i18n and RESTful webservices access thanks the following components:

How to install:

Getting started:

Create your project

Create a MVP dialog

MVP is the common pattern for building complex GWT applications. GWT-Forge-Plugin supports this pattern by generating a MVP package with a View UI XML, View binding class and a Presenter class.

To do this type gwt new-mvp menu

Generate a widget from a model type

A another common usecase is to generate widgets form a domainmodel. This is helpful if you need a default representation of a modeltype that you can change to your needs. Another cool thing is that your message properties are automatically extended for each property label description.

You can do this with the generate-view command.

gwt generate-view --edit --table --list

TODO For now there is no override check implemented, so be careful, files are overridden!

Wire a event between eventbus and presenter

The eventbus is the switchyard of your application. It routes events between different MVPs and controls the event flow. MVP4G declare this information an a eventbus interface. The annoying thing is, that each event method need a counterpart method on the declared handler class. Forge-GWT-Plugin can generate this counterpart method on the handler (presenter) for you. All you need is to define the eventmethod and interface on the businterface and run gwt wire-events.


Add your event (myEvent) to the EventBus Interface

@Events(startPresenter=ApplicationPresenterImpl.class, ginModules=GwtmvpGinClientModule.class)
public interface GwtmvpEventBus extends EventBusWithLookup {

    void start();

    void myEvent();

Generate the presenter eventhandler methods with gwt wire-events.

Test your new app

Testing your app in JBoss-Forge is really easy. Exceute gwt run or gwt debug to do this.