- All Implemented Interfaces:
Serializable
,Iterable<Component>
,IEventSink
,IEventSource
,IWizard
,IWizardModelListener
,IFeedbackContributor
,IConverterLocator
,IMetadataContext<Serializable,
,Component> IQueueRegion
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
IWizardModel
to navigate through the steps.
Before you can use the wizard component, it needs to be initialized with a model. You do this by
calling init(IWizardModel)
with the wizard model you intent to use.
This default implementation should be useful for basic cases, if the layout is exactly what you
need. If you want to provide your own layout and/ or have more or less components (e.g. you want
to additionally provide an overview component), you can override this class and add the
components you want yourself using methods like newButtonBar(String)
et-cetera.
- Author:
- Eelco Hillenius
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Component id of the buttons panel as used by the default wizard panel.static final String
Component id of the feedback panel as used by the default wizard panel.static final String
Component id of the form as used by the default wizard panel.static final String
Component id of the header panel as used by the default wizard panel.static final String
Component id of the overview panel as used by the default wizard panel.static final String
Component id of the view panel (where the main wizard contents go) as used by the default wizard panel.Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
Constructor Summary
ConstructorDescriptionConstruct.Wizard
(String id, IWizardModel wizardModel) Construct with a transition model. -
Method Summary
Modifier and TypeMethodDescriptionfinal IWizardStep
Convenience method to get the active step from the model.Form<?>
getForm()
Gets the form in which the view is nested, and on which the wizard buttons work.final IWizardModel
Gets the model this wizard is using.protected void
init
(IWizardModel wizardModel) Initialize this wizard with a transition model.boolean
Turn versioning off for wizards.protected Component
newButtonBar
(String id) Create a new button bar.protected Component
Create a new feedback panel.protected <E> Form<E>
Create a new form.protected Component
newOverviewBar
(String id) Create a new overview bar.void
onActiveStepChanged
(IWizardStep newStep) Called when the active step of this model changed.void
onCancel()
Called when the wizard is canceled.void
onFinish()
Called when the wizard is finished.Methods inherited from class org.apache.wicket.markup.html.panel.Panel
getRegionMarkup, newMarkupSourcingStrategy
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.wicket.IQueueRegion
dequeue, newDequeueContext
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
BUTTONS_ID
Component id of the buttons panel as used by the default wizard panel.- See Also:
-
FEEDBACK_ID
Component id of the feedback panel as used by the default wizard panel.- See Also:
-
HEADER_ID
Component id of the header panel as used by the default wizard panel.- See Also:
-
OVERVIEW_ID
Component id of the overview panel as used by the default wizard panel.- See Also:
-
FORM_ID
Component id of the form as used by the default wizard panel.- See Also:
-
VIEW_ID
Component id of the view panel (where the main wizard contents go) as used by the default wizard panel.- See Also:
-
-
Constructor Details
-
Wizard
Construct. Adds the default style.If you override this class, it makes sense to call this constructor (super(id)), then - in your constructor - construct a transition model and then call
init(IWizardModel)
to initialize the wizard.This constructor is not meant for normal clients of this class
- Parameters:
id
- The component model
-
Wizard
Construct with a transition model. Adds the default style.For most clients, this is typically the right constructor to use.
- Parameters:
id
- The component idwizardModel
- The transitions model
-
-
Method Details
-
getActiveStep
Convenience method to get the active step from the model.- Returns:
- The active step
-
getForm
Gets the form in which the view is nested, and on which the wizard buttons work.- Returns:
- The wizard form
-
getWizardModel
Description copied from interface:IWizard
Gets the model this wizard is using. This should never be null; a wizard is supposed to have a model.- Specified by:
getWizardModel
in interfaceIWizard
- Returns:
- The wizard model.
- See Also:
-
isVersioned
Turn versioning off for wizards. This works best when the wizard is not accessed from bookmarkable pages, so that the url doesn't change at all.- Overrides:
isVersioned
in classComponent
- Returns:
- False
- See Also:
-
onActiveStepChanged
Description copied from interface:IWizardModelListener
Called when the active step of this model changed.- Specified by:
onActiveStepChanged
in interfaceIWizardModelListener
- Parameters:
newStep
- The new step- See Also:
-
onCancel
Called when the wizard is canceled.- Specified by:
onCancel
in interfaceIWizardModelListener
-
onFinish
Called when the wizard is finished.- Specified by:
onFinish
in interfaceIWizardModelListener
-
init
Initialize this wizard with a transition model.If you constructed this wizard using a constructor without the transitions model argument, you must call this method prior to actually using it.
- Parameters:
wizardModel
-
-
newButtonBar
Create a new button bar. Clients can override this method to provide a custom button bar.- Parameters:
id
- The id to be used to construct the component- Returns:
- A new button bar
-
newFeedbackPanel
Create a new feedback panel. Clients can override this method to provide a custom feedback panel.- Parameters:
id
- The id to be used to construct the component- Returns:
- A new feedback panel
-
newForm
Create a new form. Clients can override this method to provide a customForm
.- Type Parameters:
E
- The form's model object type- Parameters:
id
- The id to be used to construct the component- Returns:
- a new form
-
newOverviewBar
Create a new overview bar. Clients can override this method to provide a custom bar.- Parameters:
id
- The id to be used to construct the component- Returns:
- A new overview bar
-