Hello,
I found that getCloseContinueOperation() is null while the first WorkpageDefaultLifecycleListener.close() operation.
From WorkplaceMBean I start a close-action:
Code:
public void onExit(ActionEvent ae) {
getWorkpageContainer().closeAllWorkpages(false, new Runnable() {
public void run() {
SessionUtils.initSessionObjects(null);
LogonMBean logon = (LogonMBean) getOwningDispatcher().getDispatchedBean(LogonMBean.class);
if (logon != null) {
logon.setPassword(null);
logon.setUser(null);
}
HttpSessionAccess.getCurrentDialogSession().invalidate();
}
});
On my workpages I have WorkpageDefaultLifecycleListener listeners:
Code:
getWorkpage().addLifecycleListener(new WorkpageDefaultLifecycleListener() {
public void reactOnDestroyed() {
super.reactOnDestroyed();
BufferedContentMgr.remove(m_downloadProvider);
}
public boolean close() {
if (!m_dirty)
return true;
else {
YESNOPopup.createInstance("UnsavedData", "Data was changed. Do you really want to exit?", new YESNOPopup.IYesNoListener() {
public void reactOnNo() {
}
public void reactOnYes() {
getWorkpageContainer().closeWorkpageForced(getWorkpage());
if (getCloseContinueOperation() != null)
getCloseContinueOperation().run();
}
});
return false;
}
}
});
In case of a workpage with unsaved data, it will be closed but all others remain open.
Any hint what's going wrong?
Regards,
Joachim