getForm().setButtonAlign(Form.ALIGN_RIGHT);
getForm().setErrorsPosition(Form.POSITION_MIDDLE);
previous = new Submit("previous");
previous.setLabel("< Previous");
getPreviousButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onPrevious();
}
});
form.add(previous);
if (!getWizardPage().hasPreviousStep(this)) {
previous.setDisabled(true);
}
next = new Submit("next");
next.setLabel("Next >");
getNextButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onNext();
}
});
form.add(next);
if (!getWizardPage().hasNextStep(this)) {
next.setDisabled(true);
}
finish = new Submit("Finish");
getFinishButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onFinish();
}
});
form.add(finish);
if (!getWizardPage().isLastStep(this)) {
finish.setDisabled(true);
}
cancel = new Submit("Cancel");
getCancelButton().setActionListener(new ActionListener() {
public boolean onAction(Control source) {
return onCancel();
}
});
form.add(cancel);