POMSession session = pomManager.getSession();
// mark page for cache invalidation otherwise DataCache will use the previous customization id when trying to set
// the portlet state in UIPortlet.setState and will not find it resulting in an error
Page page = window.getPage();
session.scheduleForEviction(new org.exoplatform.portal.pom.data.PageKey("portal", page.getSite().getName(), page
.getName()));
// save
session.save();
}