Author: julien_viet
Date: 2010-03-13 09:30:25 -0500 (Sat, 13 Mar 2010)
New Revision: 2232
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
Log:
previous commit should also have commited that
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml 2010-03-13
14:29:13 UTC (rev 2231)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/navigation.xml 2010-03-13
14:30:25 UTC (rev 2232)
@@ -54,12 +54,5 @@
<visibility>SYSTEM</visibility>
<page-reference>portal::@owner@::register</page-reference>
</node>
-
- <node>
- <uri>notfound</uri>
- <name>notfound</name>
- <label>NotFound</label>
- <visibility>SYSTEM</visibility>
- </node>
</page-nodes>
</node-navigation>
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2010-03-13
14:29:13 UTC (rev 2231)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2010-03-13
14:30:25 UTC (rev 2232)
@@ -144,9 +144,16 @@
{
dataService.save(navigation);
}
-
+
+ // Reload navigation here as some navigation could exist in the back end such as
system navigations
+ // that would not be in the current edited UI navigation
+ navigation = dataService.getPageNavigation(navigation.getOwnerType(),
navigation.getOwnerId());
+
UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
setNavigation(uiPortalApp.getNavigations(), navigation);
+
+ // Need to relocalize as it was loaded from storage
+ uiPortalApp.localizeNavigations();
//Update UIPortal corredponding to edited navigation
UIPortal targetedUIPortal = uiPortalApp.getCachedUIPortal(editedOwnerType,
editedOwnerId);
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-03-13
14:29:13 UTC (rev 2231)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-03-13
14:30:25 UTC (rev 2232)
@@ -102,14 +102,6 @@
PageNode targetPageNode = getTargetedNode(targetedNav, targetPath);
List<PageNode> targetedPathNodes = findPath(targetedNav, targetPath);
- //If targetPageNode is null, which happens only if the navigation contains only
'notfound' node,
- //we send a change page node event for redirecting to 'notfound' node
- if(targetPageNode == null)
- {
- redirectToNotFoundNode(showedUIPortal);
- return;
- }
-
if(formerNavType.equals(newNavType) && formerNavId.equals(newNavId))
{
//Case 1: Both navigation type and id are not changed, but current page node
is changed
@@ -373,12 +365,6 @@
PortalDataMapper.toUIPortal(uiPortal, userPortalConfig);
return uiPortal;
}
-
- private void redirectToNotFoundNode(UIPortal uiPortal) throws Exception
- {
- PageNodeEvent<UIPortal> changePageNodeEvent = new
PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE,
"/notfound");
- uiPortal.broadcast(changePageNodeEvent, Event.Phase.PROCESS);
- }
}