Author: chris.laprun(a)jboss.com
Date: 2011-08-01 10:57:53 -0400 (Mon, 01 Aug 2011)
New Revision: 6963
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
Log:
- Use label for display name but it's issuing i18n commands...
- Generate usable URIs.
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-07-31
23:58:58 UTC (rev 6962)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-08-01
14:57:53 UTC (rev 6963)
@@ -22,11 +22,13 @@
package org.gatein.portal.api.impl.portal;
+import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.exoplatform.portal.mop.navigation.NodeContext;
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.NodeState;
import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.webui.util.Util;
import org.gatein.api.GateIn;
import org.gatein.api.id.Context;
import org.gatein.api.id.GenericContext;
@@ -38,6 +40,7 @@
import org.gatein.api.util.Filter;
import org.gatein.api.util.IterableIdentifiableCollection;
import org.gatein.api.util.Query;
+import org.gatein.common.net.URLTools;
import org.gatein.portal.api.impl.GateInImpl;
import org.gatein.portal.api.impl.util.AdaptedIterableIdentifiableCollection;
@@ -105,7 +108,10 @@
{
try
{
- uri = new URI(buildURI().toString());
+ PortalRequestContext requestContext = Util.getPortalRequestContext();
+ String host = URLTools.getServerAddressFrom(requestContext.getRequest());
+ String portalURI = host + requestContext.getPortalURI();
+ uri = new URI(portalURI + buildURI().toString());
}
catch (URISyntaxException e)
{
@@ -267,7 +273,7 @@
public String getDisplayName()
{
- return getName();
+ return context.getState().getLabel();
}
public GateIn getGateIn()
Show replies by date