public interface PageNode<W extends com.google.gwt.user.client.ui.IsWidget>
Thinking of the application flow as a directed graph, Pages are the nodes and TransitionTo
s are the edges.
Modifier and Type | Method and Description |
---|---|
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 |
getURL()
Returns the URL template specified for this page by
Page.path() . |
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.
|
String name()
String getURL()
Page.path()
. If no template is specified, it returns the page name.void produceContent(CreationalCallback<W> callback)
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.Class<W> contentType()
produceContent(CreationalCallback)
method will produce.void pageShowing(W widget, HistoryToken state)
If this method throws an exception when called, framework behaviour is undefined.
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.void pageShown(W widget, HistoryToken state)
If this method throws an exception when called, framework behaviour is undefined.
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.void pageHiding(W widget, NavigationControl control)
If this method throws an exception when called, framework behaviour is undefined.
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.void pageHidden(W widget)
If this method throws an exception when called, framework behaviour is undefined.
widget
- the widget instance (which was in the navigation content panel) that was previously used in the call to
pageShowing(IsWidget, HistoryToken)
. Never null.void destroy(W widget)
Dependent
scoped beans after a page is no longer needed. For
ApplicationScoped
beans this method is a noop.widget
- The widget instance that will be destroyed if it is a dependent-scoped bean. Never null.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.