if (currentPage < totalPages - 1) {
WizardPage current = (WizardPage) pages.get(currentPage);
WizardPageAdapter wpAdapter = current.getAdapter();
if (wpAdapter != null)
wpAdapter.preparePage(current);
if (wpAdapter == null || wpAdapter.finalizePage(current)) {
do {
current = (WizardPage) pages.get(++currentPage);
} while (!current.isEnabled());
if (current.getAdapter() != null)
current.getAdapter().preparePage(current);