Module org.apache.wicket.extensions
Class AbstractWizardModel
java.lang.Object
org.apache.wicket.extensions.wizard.AbstractWizardModel
- All Implemented Interfaces:
Serializable,IWizardModel,org.apache.wicket.util.io.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 voidaddListener(IWizardModelListener listener) Adds a wizard model listener.voidcancel()This implementation just firesa cancel event.voidfinish()This implementation just firesa finish event.protected final voidNotify listeners that the active step has changed.protected final voidNotify listeners that the wizard is finished.protected final voidNotify listeners that the wizard is finished.booleanGets whether cancel functionality is available.booleanChecks if the last button should be displayed.final voidremoveListener(IWizardModelListener listener) Removes a wizard model listener.voidsetCancelVisible(boolean cancelVisible) Sets whether cancel functionality is available.voidsetLastVisible(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, waitMethods 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:
addListenerin 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:
cancelin 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:
finishin interfaceIWizardModel- See Also:
-
isCancelVisible
Gets whether cancel functionality is available.- Specified by:
isCancelVisiblein 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:
isLastVisiblein interfaceIWizardModel- Returns:
- true if the previous last should be displayed, false otherwise.
- See Also:
-
removeListener
Removes a wizard model listener.- Specified by:
removeListenerin 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.
-