Module org.apache.wicket.extensions
Class DynamicWizardModel
java.lang.Object
org.apache.wicket.extensions.wizard.AbstractWizardModel
org.apache.wicket.extensions.wizard.dynamic.DynamicWizardModel
- All Implemented Interfaces:
Serializable,IWizardModel,org.apache.wicket.util.io.IClusterable
Wizard model that is specialized on dynamic wizards. Unlike the default, static
wizard model, this model isn't very intelligent, but rather delegates much of
the work and knowledge to the dynamic wizard steps it uses.- Author:
- eelcohillenius
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the current active step the wizard should display.final IDynamicWizardStepbooleanGets whether the finish button should be enabled.booleanChecks if the last button should be enabled.booleanisLastStep(IWizardStep step) Gets whether the specified step is the last step in the wizard.booleanGets whether the next button should be enabled.booleanGets whether the previous button should be enabled.voidlast()Takes the model to the last step in the wizard.voidnext()Increments the model to the next step.voidprevious()Takes the model to the previous step.This method must only be called ifIWizardModel.isPreviousAvailable()returns true.voidreset()Resets the model, setting it to the first step.protected final voidSets the active step.Returns an iterator over all the steps in the model.Methods inherited from class org.apache.wicket.extensions.wizard.AbstractWizardModel
addListener, cancel, finish, fireActiveStepChanged, fireWizardCancelled, fireWizardFinished, isCancelVisible, isLastVisible, removeListener, setCancelVisible, setLastVisible
-
Constructor Details
-
DynamicWizardModel
Construct.- Parameters:
startStep- first step in the wizard
-
-
Method Details
-
getActiveStep
Description copied from interface:IWizardModelGets the current active step the wizard should display.- Returns:
- the active step.
- See Also:
-
getStartStep
- Returns:
- the step this wizard was constructed with (starts the wizard). Will be used for
resetting the wizard, unless you override
reset().
-
isLastAvailable
Description copied from interface:IWizardModelChecks if the last button should be enabled.- Returns:
- true if the last button should be enabled, false otherwise.
- See Also:
-
isLastStep
Description copied from interface:IWizardModelGets whether the specified step is the last step in the wizard.- Parameters:
step- the step to check- Returns:
- True if its the final step in the wizard, false otherwise.
- See Also:
-
isNextAvailable
Description copied from interface:IWizardModelGets whether the next button should be enabled.- Returns:
- True if the next button should be enabled, false otherwise.
- See Also:
-
isPreviousAvailable
Description copied from interface:IWizardModelGets whether the previous button should be enabled.- Returns:
- True if the previous button should be enabled, false otherwise.
- See Also:
-
isFinishAvailable
Description copied from interface:IWizardModelGets whether the finish button should be enabled.By default the finish button is available for the last step only.
- Returns:
- True if the finish button should be enabled, false otherwise.
- See Also:
-
last
Description copied from interface:IWizardModelTakes the model to the last step in the wizard. This method must only be called ifIWizardModel.isLastAvailable()returns true. Implementors should notifylistenersthrough callingIWizardModelListener.onActiveStepChanged(IWizardStep).- See Also:
-
next
Description copied from interface:IWizardModelIncrements the model to the next step. This method must only be called ifIWizardModel.isNextAvailable()returns true. Implementors should notifylistenersthrough callingIWizardModelListener.onActiveStepChanged(IWizardStep).- See Also:
-
previous
Description copied from interface:IWizardModelTakes the model to the previous step.This method must only be called ifIWizardModel.isPreviousAvailable()returns true. Implementors should notifylistenersthrough callingIWizardModelListener.onActiveStepChanged(IWizardStep).- See Also:
-
reset
Description copied from interface:IWizardModelResets the model, setting it to the first step. Implementors should notifylistenersthrough callingIWizardModelListener.onActiveStepChanged(IWizardStep).- See Also:
-
stepIterator
Description copied from interface:IWizardModelReturns an iterator over all the steps in the model. The iteration order is not guaranteed to the be the order of visit. This is an optional operation; dynamic models can just return null, and should call init the first time a step is encountered right before rendering it.- Returns:
- an iterator over all the steps of the model or null if the wizard model is not static
- See Also:
-
setActiveStep
Sets the active step.- Parameters:
step- the new active step step.
-