Fork me on GitHub

The Wicket viewer allows you to customize the GUI in several (progressively more sophisticated) ways:

In the vast majority of cases customization should be sufficient by replacing elements of a page. However, it is also possible to define an entirely new page for a given page type.

Page Types

Isis defines eight page types (see the org.apache.isis.viewer.wicket.model.models.PageType enum):

Page type Renders
SIGN_IN The initial sign-in page
HOME The home page, displaying either the welcome message or dashboard
ABOUT The about page, accessible from link top-right
ENTITY Renders a single entity or view model
STANDALONE_COLLECTION Page rendered after invoking an action that returns a collection of entites
VALUE After invoking an action that returns a value type (though not URLs or Blob/Clobs, as these are handled appropriately automatically).
VOID_RETURN After invoking an action that is `void`
ACTION_PROMPT (No longer used).

PageClassList interface

The PageClassList interface declares which class (subclass of org.apache.wicket.Page is used to render for each of these types. For example, Isis' WicketSignInPage renders the signin page. To specify a different page class, create a custom subclass of PageClassList:

@Singleton
public class MyPageClassList extends PageClassListDefault {

    protected Class<? extends Page> getSignInPageClass() {
        return MySignInPage.class;
    }
}

Registering the Custom PageClassList

This updated PageClassList implementation is then registered by adjusting the Guice bindings (part of Isis' bootstrapping) in your custom subclass of IsisWicketApplication:

public class MyAppApplication extends IsisWicketApplication {
    @Override
    protected Module newIsisWicketModule() {
        final Module isisDefaults = super.newIsisWicketModule();
        final Module myAppOverrides = new AbstractModule() {
            @Override
            protected void configure() {
                ...
                bind(PageClassList.class).to(MyPageClassList.class);
                ...
            }
        };

        return Modules.override(isisDefaults).with(myAppOverrides);
    }
}