* @version $Revision$
*/
public static class FinishPageEditionActionListener extends EventListener<UIPortalComposer> {
public void execute(Event<UIPortalComposer> event) throws Exception {
UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
UIEditInlineWorkspace editInlineWS = event.getSource().getParent();
UIWorkingWorkspace uiWorkingWS = editInlineWS.getParent();
//Reset tab pane state
UITabPane tabPane = event.getSource().getChild(UITabPane.class);
tabPane.setSelectedTab(1);
UIPortal uiPortal = uiPortalApp.getCurrentSite();
UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
UIPage uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
Page page = (Page) PortalDataMapper.buildModelObject(uiPage);
String pageId = page.getPageId();
UserPortalConfigService portalConfigService = uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
/* Put the portal back in place as we have removed it in
* org.exoplatform.portal.webui.workspace.UIMainActionListener.EditInlineActionListener.execute(Event<UIWorkingWorkspace>) */
UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
UIComponent editComponent = uiEditWS.getUIComponent();
if (editComponent instanceof UIPortal) {
UIPortal editPortal = (UIPortal) editComponent;
editPortal.setHeaderAndFooterRendered(true);
siteBody.setUIComponent(editPortal);
}