| java.lang.Object org.pietschy.wizard.AbstractWizardModel org.pietschy.wizard.models.DynamicModel
DynamicModel | public class DynamicModel extends AbstractWizardModel (Code) | | The DynamicModel is very similar to the static model, except that steps can be dynamically removed
from the wizard flow.
// create a subclass of DynamicModel
MyDynamicModel model = new MyDynamicModel();
// add the first step..
model.add(new MyFirstStep());
// add an optional step..
model.add(new MyOptionalStep(), new Condition()
{
public boolean evaluate(WizardModel model)
{
return ((MyDynamicModel) model).isOptionalRequired();
}
});
// add the last step.
model.add(new MyLastStep());
// now create the wizard and use it..
Wizard wizard = new Wizard(model);
It is also worth noting that steps that implement
Condition can be added using the basic
DynamicModel.add(WizardStep) and the model will automatically add them as an optional step.
See Also: DynamicModel.add(WizardStep) See Also: DynamicModel.add(WizardStep,Condition) |
Constructor Summary | |
public | DynamicModel() Creates a new DynamicModel. |
TRUE_CONDITION | final public static Condition TRUE_CONDITION(Code) | | An implementation of
Condition that always returns true.
|
DynamicModel | public DynamicModel()(Code) | | Creates a new DynamicModel.
|
allStepsComplete | public boolean allStepsComplete()(Code) | | Returns true if all included steps in the wizard return true from
WizardStep.isComplete . This
is primarily used to determine if the last button can be enabled.
Please note that this method ignores all steps for which their
Condition returns false.
true if all the visible steps in the wizard are complete, false otherwise. |
lastStep | public void lastStep()(Code) | | |
nextStep | public void nextStep()(Code) | | |
previousStep | public void previousStep()(Code) | | |
refreshModelState | public void refreshModelState()(Code) | | Forces the model to re-evaluate it's current state. This method will re-evalute the
conditional steps by calling
Condition.evaluate(org.pietschy.wizard.WizardModel) .
Subclasses that override this method must be sure to invoke super.refreshModelState().
|
reset | public void reset()(Code) | | |
|
|