&& pages.get(oldPageIndex) instanceof IFormPage) {
// Commit old page before activating the new one
IFormPage oldFormPage = (IFormPage) pages.get(oldPageIndex);
IManagedForm mform = oldFormPage.getManagedForm();
if (mform != null)
mform.commit(false);
}
if (pages.size() > newPageIndex
&& pages.get(newPageIndex) instanceof IFormPage)
((IFormPage) pages.get(newPageIndex)).setActive(true);
if (oldPageIndex != -1 && pages.size() > oldPageIndex