Errai 3.0.1-SNAPSHOT

org.jboss.errai.ui.nav.client.local.spi
Interface PageNode<W extends com.google.gwt.user.client.ui.IsWidget>


public interface PageNode<W extends com.google.gwt.user.client.ui.IsWidget>

Represents a page (a distinct place that can be navigated to and bookmarked to return to later).

Thinking of the application flow as a directed graph, Pages are the nodes and TransitionTos are the edges.

Author:
Jonathan Fuerth

Method Summary
 Class<W> contentType()
          Returns the type of widget that this page node's produceContent(CreationalCallback) method will produce.
 void destroy(W widget)
          Used by the framework to destroy Dependent scoped beans after a page is no longer needed.
 String name()
          Returns the name of this page.
 void pageHidden(W widget)
          Called by the framework after this page has been removed from the navigation content panel.
 void pageHiding(W widget, NavigationControl control)
          Called by the framework when this page node is about to be removed from the navigation content panel.
 void pageShowing(W widget, HistoryToken state)
          Called by the framework when this page node is about to be displayed in the navigation content panel.
 void pageShown(W widget, HistoryToken state)
          Called by the framework when this page node was displayed in the navigation content panel.
 void produceContent(CreationalCallback<W> callback)
          Retrieves the widget that provides this page's content from the client-side bean manager.
 

Method Detail

name

String name()
Returns the name of this page.

Returns:
This page's name. Never null.

produceContent

void produceContent(CreationalCallback<W> callback)
Retrieves the widget that provides this page's content from the client-side bean manager.

Parameters:
callback - The callback that will receive the widget to display for this page. The Widget will have the same runtime type as returned by contentType(), and will never be null.

contentType

Class<W> contentType()
Returns the type of widget that this page node's produceContent(CreationalCallback) method will produce.

Returns:
The type of widget that supplies this page's content. Never null.

pageShowing

void pageShowing(W widget,
                 HistoryToken state)
Called by the framework when this page node is about to be displayed in the navigation content panel.

If this method throws an exception when called, framework behaviour is undefined.

Parameters:
widget - the widget instance that was just returned from a call to produceContent(CreationalCallback). Never null.
state - the state of the page, parsed from the history token on the URL. Never null.

pageShown

void pageShown(W widget,
               HistoryToken state)
Called by the framework when this page node was displayed in the navigation content panel.

If this method throws an exception when called, framework behaviour is undefined.

Parameters:
widget - the widget instance that was just returned from a call to produceContent(CreationalCallback). Never null.
state - the state of the page, parsed from the history token on the URL. Never null.

pageHiding

void pageHiding(W widget,
                NavigationControl control)
Called by the framework when this page node is about to be removed from the navigation content panel.

If this method throws an exception when called, framework behaviour is undefined.

Parameters:
widget - the widget instance (which is currently in the navigation content panel) that was previously used in the call to pageShowing(IsWidget, HistoryToken). Never null.

pageHidden

void pageHidden(W widget)
Called by the framework after this page has been removed from the navigation content panel.

If this method throws an exception when called, framework behaviour is undefined.

Parameters:
widget - the widget instance (which was in the navigation content panel) that was previously used in the call to pageShowing(IsWidget, HistoryToken). Never null.

destroy

void destroy(W widget)
Used by the framework to destroy Dependent scoped beans after a page is no longer needed. For ApplicationScoped beans this method is a noop.

Parameters:
widget - The widget instance that will be destroyed if it is a dependent-scoped bean. Never null.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.