Module org.apache.wicket.extensions
Class AbstractWizardModel
java.lang.Object
org.apache.wicket.extensions.wizard.AbstractWizardModel
- All Implemented Interfaces:
Serializable
,IWizardModel
,IClusterable
- Direct Known Subclasses:
DynamicWizardModel
,WizardModel
Abstract wizard model that provides an implementation for handling
wizard model listeners
and provides base implementations of many methods. If you want to provide
a custom implementation of IWizardModel
, it is recommended you start by overriding this
class.- Author:
- eelcohillenius
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addListener
(IWizardModelListener listener) Adds a wizard model listener.void
cancel()
This implementation just firesa cancel event
.void
finish()
This implementation just firesa finish event
.protected final void
Notify listeners that the active step has changed.protected final void
Notify listeners that the wizard is finished.protected final void
Notify listeners that the wizard is finished.boolean
Gets whether cancel functionality is available.boolean
Checks if the last button should be displayed.final void
removeListener
(IWizardModelListener listener) Removes a wizard model listener.void
setCancelVisible
(boolean cancelVisible) Sets whether cancel functionality is available.void
setLastVisible
(boolean lastVisible) Configures if the last button should be displayed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.extensions.wizard.IWizardModel
getActiveStep, isFinishAvailable, isLastAvailable, isLastStep, isNextAvailable, isPreviousAvailable, last, next, previous, reset, stepIterator
-
Constructor Details
-
AbstractWizardModel
public AbstractWizardModel()Construct.
-
-
Method Details
-
addListener
Adds a wizard model listener.- Specified by:
addListener
in interfaceIWizardModel
- Parameters:
listener
- The listener to add
-
cancel
This implementation just firesa cancel event
. Though this isn't a very strong contract, it gives all the power to the user of this model.- Specified by:
cancel
in interfaceIWizardModel
- See Also:
-
finish
This implementation just firesa finish event
. Though this isn't a very strong contract, it gives all the power to the user of this model.- Specified by:
finish
in interfaceIWizardModel
- See Also:
-
isCancelVisible
Gets whether cancel functionality is available.- Specified by:
isCancelVisible
in interfaceIWizardModel
- Returns:
- Whether cancel functionality is available
- See Also:
-
isLastVisible
Checks if the last button should be displayed. This method should only return true ifIWizardModel.isLastAvailable()
can return true at any point. Returning false will prevent the last button from appearing on the wizard at all.- Specified by:
isLastVisible
in interfaceIWizardModel
- Returns:
- true if the previous last should be displayed, false otherwise.
- See Also:
-
removeListener
Removes a wizard model listener.- Specified by:
removeListener
in interfaceIWizardModel
- Parameters:
listener
- The listener to remove
-
setCancelVisible
Sets whether cancel functionality is available.- Parameters:
cancelVisible
- Whether cancel functionality is available
-
setLastVisible
Configures if the last button should be displayed.- Parameters:
lastVisible
- true to display the last button, false otherwise.- See Also:
-
fireActiveStepChanged
Notify listeners that the active step has changed.- Parameters:
step
- The new step
-
fireWizardCancelled
Notify listeners that the wizard is finished. -
fireWizardFinished
Notify listeners that the wizard is finished.
-