/**
* Removes panel from its region, but keeping it assigned to this section.
*/
public CommandResponse panelActionClose(final Panel panel, CommandRequest request) {
HibernateTxFragment txFragment = new HibernateTxFragment() {
protected void txFragment(Session session) throws Exception {
log.debug("Closing panel " + panel.getPanelId());
beforePanelClosed(panel);
Section section = panel.getSection();
section.removePanelFromRegion(panel);
UIServices.lookup().getSectionsManager().store(section);
fireAfterPanelClosed(panel);
}
};
try {
txFragment.execute();
} catch (Exception e) {
log.error("Can't remove panel from region.", e);
}
return new ShowPanelPage();
}