Author: ndkhoiits
Date: 2010-04-09 00:32:12 -0400 (Fri, 09 Apr 2010)
New Revision: 2538
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
Log:
- GTNPORTAL-1051. Whatever, always refresh page in ChangePageNodeActionListener
- Improve sourcecode in EditInlineActionListener
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-04-09
02:02:39 UTC (rev 2537)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-04-09
04:32:12 UTC (rev 2538)
@@ -111,8 +111,6 @@
{
showedUIPortal.setSelectedNode(targetPageNode);
showedUIPortal.setSelectedPath(targetedPathNodes);
- showedUIPortal.refreshUIPage();
- return;
}
}
else
@@ -121,12 +119,12 @@
// First, we try to find a cached UIPortal
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
- UIPortal cachedUIPortal = uiPortalApp.getCachedUIPortal(newNavType,
newNavId);
- if (cachedUIPortal != null)
+ showedUIPortal = uiPortalApp.getCachedUIPortal(newNavType, newNavId);
+ if (showedUIPortal != null)
{
- cachedUIPortal.setSelectedNode(targetPageNode);
- cachedUIPortal.setSelectedPath(targetedPathNodes);
- uiPortalApp.setShowedUIPortal(cachedUIPortal);
+ showedUIPortal.setSelectedNode(targetPageNode);
+ showedUIPortal.setSelectedPath(targetedPathNodes);
+ uiPortalApp.setShowedUIPortal(showedUIPortal);
//Temporary solution to fix edit inline error while switching between
navigations
DataStorage storageService =
uiPortalApp.getApplicationComponent(DataStorage.class);
@@ -139,25 +137,21 @@
//Update selected navigation on UserPortalConfig, that is mandatory as at
the moment the PortalConfig
//does not hold any navigation data.
userPortalConfig.updateSelectedNavigation(newNavType, newNavId);
-
- cachedUIPortal.refreshUIPage();
- return;
}
else
{
- UIPortal newUIPortal = buildUIPortal(targetedNav, uiPortalApp,
uiPortalApp.getUserPortalConfig());
- if(newUIPortal == null)
+ showedUIPortal = buildUIPortal(targetedNav, uiPortalApp,
uiPortalApp.getUserPortalConfig());
+ if(showedUIPortal == null)
{
return;
}
- newUIPortal.setSelectedNode(targetPageNode);
- newUIPortal.setSelectedPath(targetedPathNodes);
- uiPortalApp.setShowedUIPortal(newUIPortal);
- uiPortalApp.putCachedUIPortal(newUIPortal);
- newUIPortal.refreshUIPage();
- return;
+ showedUIPortal.setSelectedNode(targetPageNode);
+ showedUIPortal.setSelectedPath(targetedPathNodes);
+ uiPortalApp.setShowedUIPortal(showedUIPortal);
+ uiPortalApp.putCachedUIPortal(showedUIPortal);
}
}
+ showedUIPortal.refreshUIPage();
}
/**
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-04-09
02:02:39 UTC (rev 2537)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-04-09
04:32:12 UTC (rev 2538)
@@ -160,9 +160,7 @@
newPortal.setSelectedNode(uiPortal.getSelectedNode());
newPortal.setSelectedNavigation(uiPortal.getSelectedNavigation());
newPortal.setSelectedPath(uiPortal.getSelectedPath());
-
- // Get instance of UIPage
- newPortal.getChild(UIPageBody.class).setPageBody(newPortal.getSelectedNode(),
newPortal);
+ newPortal.refreshUIPage();
UIEditInlineWorkspace uiEditWS =
uiWorkingWS.getChild(UIEditInlineWorkspace.class);
uiEditWS.setUIComponent(newPortal);
Show replies by date