gatein SVN: r7026 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 05:40:24 -0400 (Tue, 09 Aug 2011)
New Revision: 7026
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PageImpl.java
Log:
- Marked inbound navigation methods as not yet implemented.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PageImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PageImpl.java 2011-08-09 09:36:57 UTC (rev 7025)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PageImpl.java 2011-08-09 09:40:24 UTC (rev 7026)
@@ -28,6 +28,7 @@
import org.gatein.api.portal.Page;
import org.gatein.api.portal.Site;
import org.gatein.api.util.IterableIdentifiableCollection;
+import org.gatein.common.NotYetImplemented;
import org.gatein.portal.api.impl.GateInImpl;
import org.gatein.portal.api.impl.IdentifiableImpl;
@@ -61,11 +62,11 @@
public IterableIdentifiableCollection<Navigation> getInboundNavigations()
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ throw new NotYetImplemented(); // todo
}
public Navigation createInboundNavigationIn(Site site, Navigation parent)
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ throw new NotYetImplemented(); // todo
}
}
13 years, 5 months
gatein SVN: r7025 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 05:36:57 -0400 (Tue, 09 Aug 2011)
New Revision: 7025
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
Log:
- Finished implementation, though createGadget method is completely untested and probably doesn't work properly.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-09 09:19:28 UTC (rev 7024)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-09 09:36:57 UTC (rev 7025)
@@ -22,6 +22,9 @@
package org.gatein.portal.api.impl.content;
+import org.exoplatform.application.gadget.GadgetRegistryService;
+import org.exoplatform.application.gadget.Source;
+import org.exoplatform.application.gadget.SourceStorage;
import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.gatein.api.content.Category;
@@ -272,7 +275,34 @@
public Gadget createGadget(String gadget, String source)
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ try
+ {
+ gateIn.begin();
+ final GadgetRegistryService gadgetService = gateIn.getGadgetService();
+ org.exoplatform.application.gadget.Gadget original = gadgetService.getGadget(gadget);
+ if (original == null)
+ {
+ original = new org.exoplatform.application.gadget.Gadget();
+ original.setName(gadget);
+ original.setUrl("http://www.gatein.org"); // todo: fix me
+ gadgetService.saveGadget(original);
+ }
+
+ SourceStorage sourceStorage = gateIn.getSourceStorage();
+ Source originalSource = sourceStorage.getSource(original);
+ originalSource.setTextContent(source);
+ sourceStorage.saveSource(original, originalSource);
+
+ return (Gadget)newContentFrom(gateIn.gadgetId(gadget), original, Gadget.class);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ gateIn.end();
+ }
}
public IterableIdentifiableCollection<Content> getAll()
@@ -412,11 +442,13 @@
public int size()
{
- return 0; //To change body of implemented methods use File | Settings | File Templates.
+ // todo: optimize
+ return getAll().size();
}
public <U extends Content> boolean contains(Id<U> id)
{
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ // todo: optimize
+ return get(id) != null;
}
}
13 years, 5 months
gatein SVN: r7024 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 05:19:28 -0400 (Tue, 09 Aug 2011)
New Revision: 7024
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
Log:
- Finished Navigation implementation for now marking createAndAdd as not yet implemented.
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-08-09 09:10:33 UTC (rev 7023)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-08-09 09:19:28 UTC (rev 7024)
@@ -42,6 +42,7 @@
import org.gatein.api.portal.Page;
import org.gatein.api.portal.Site;
import org.gatein.api.util.IterableIdentifiableCollection;
+import org.gatein.common.NotYetImplemented;
import org.gatein.common.net.URLTools;
import org.gatein.common.text.EntityEncoder;
import org.gatein.common.util.EmptyResourceBundle;
@@ -223,9 +224,14 @@
{
loadChildrenIfNeeded();
- return context.get(navigationId.toString()) != null;
+ return getChild(navigationId) != null;
}
+ private <U extends Navigation> NodeContext<NavigationImpl> getChild(Id<U> navigationId)
+ {
+ return context.get(navigationId.getComponent(GateInImpl.NAVIGATION_COMPONENT));
+ }
+
public Navigation createAndAdd(String key)
{
return createAndAdd(getIdForChild(key));
@@ -233,7 +239,7 @@
public <U extends Navigation> U createAndAdd(Id<U> navigationId)
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ throw new NotYetImplemented(); // TODO
}
public Navigation get(String key)
@@ -243,7 +249,17 @@
public <U extends Navigation> U get(Id<U> navigationId)
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ if (navigationId == null)
+ {
+ return null;
+ }
+ else
+ {
+ loadChildrenIfNeeded();
+ final Class<U> type = navigationId.getIdentifiableType();
+ final NodeContext<NavigationImpl> child = getChild(navigationId);
+ return child != null ? type.cast(child.getNode()) : null;
+ }
}
public Id<Navigation> getIdForChild(String key)
13 years, 5 months
gatein SVN: r7023 - in portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl: portal and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 05:10:33 -0400 (Tue, 09 Aug 2011)
New Revision: 7023
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
Log:
- Removed Query references.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-09 08:35:44 UTC (rev 7022)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-09 09:10:33 UTC (rev 7023)
@@ -28,13 +28,11 @@
import org.gatein.api.content.Content;
import org.gatein.api.content.ContentRegistry;
import org.gatein.api.content.Gadget;
-import org.gatein.api.content.ManagedContent;
import org.gatein.api.content.Portlet;
import org.gatein.api.content.WSRP;
import org.gatein.api.id.Id;
import org.gatein.api.util.IterableCollection;
import org.gatein.api.util.IterableIdentifiableCollection;
-import org.gatein.api.util.Query;
import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.pc.federation.FederatingPortletInvoker;
@@ -272,11 +270,6 @@
return wanted.cast(result);
}
- public IterableIdentifiableCollection<ManagedContent> getManagedContents(Query<ManagedContent> query)
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
public Gadget createGadget(String gadget, String source)
{
return null; //To change body of implemented methods use File | Settings | File Templates.
@@ -426,9 +419,4 @@
{
return false; //To change body of implemented methods use File | Settings | File Templates.
}
-
- public <U extends Content> IterableIdentifiableCollection<U> getAllSatisfying(Query<U> query)
- {
- return null;
- }
}
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-08-09 08:35:44 UTC (rev 7022)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-08-09 09:10:33 UTC (rev 7023)
@@ -42,7 +42,6 @@
import org.gatein.api.portal.Page;
import org.gatein.api.portal.Site;
import org.gatein.api.util.IterableIdentifiableCollection;
-import org.gatein.api.util.Query;
import org.gatein.common.net.URLTools;
import org.gatein.common.text.EntityEncoder;
import org.gatein.common.util.EmptyResourceBundle;
@@ -252,11 +251,6 @@
return site.getIdForChild(key);
}
- public <U extends Navigation> IterableIdentifiableCollection<U> getAllSatisfying(Query<U> query)
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
public Id<Navigation> getId()
{
if (id == null)
13 years, 5 months
gatein SVN: r7022 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 04:35:44 -0400 (Tue, 09 Aug 2011)
New Revision: 7022
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
Log:
- Confirmed that it's not possible to resolve a Navigation directly at the moment.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:26:29 UTC (rev 7021)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:35:44 UTC (rev 7022)
@@ -547,11 +547,13 @@
final String siteStringId = id.getComponent(NAVIGATION_SITE_COMPONENT);
final Id<Site> siteId = SITE_CONTEXT.parse(siteStringId, Site.class);
final Site site = getSite(siteId, null);
- result = site.getNavigation().get(id.getComponent(NAVIGATION_COMPONENT)); //todo: this probably doesn't work correctly
+ //todo: need to get all the parents of a Navigation to be able to load it so we would need to add the complete path to the Id to be able to resolve Navigations properly
+ result = site.getNavigation().get(id.getComponent(NAVIGATION_COMPONENT));
+
+ throw new UnsupportedOperationException("Id<" + type.getSimpleName() + "> not yet supported");
}
else
{
- // todo: finish support of other types
throw new UnsupportedOperationException("Id<" + type.getSimpleName() + "> not yet supported");
}
13 years, 5 months
gatein SVN: r7021 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 04:26:29 -0400 (Tue, 09 Aug 2011)
New Revision: 7021
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
Log:
- Added dumb gadgetID(URI) implementation.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:23:32 UTC (rev 7020)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:26:29 UTC (rev 7021)
@@ -635,7 +635,7 @@
public Id<Gadget> gadgetId(URI uri)
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return GADGET_CONTEXT.create(Gadget.class, uri.toString());
}
public <T extends Content> Id<ManagedContent> managedContentId(Id<Category> categoryId, String name, Id<T> contentId)
13 years, 5 months
gatein SVN: r7020 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 04:23:32 -0400 (Tue, 09 Aug 2011)
New Revision: 7020
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
Log:
- Added TODOs to point at optimization opportunities.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:21:51 UTC (rev 7019)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:23:32 UTC (rev 7020)
@@ -510,8 +510,9 @@
Id<Site> siteId = (Id<Site>)id;
result = getSite(siteId, null);
}
- else if (Content.class.equals(type))
+ else if (Content.class.isAssignableFrom(type))
{
+ // todo: split by types and optimize by calling portlet invoker or gadget registry directly
final IterableIdentifiableCollection<Portal> portals = getPortals();
for (Portal portal : portals)
{
@@ -524,6 +525,7 @@
}
else if (Category.class.equals(type))
{
+ // todo: optimize by adding portal id to category id (so that appropriate content registry can be retrieved) and calling application registry directly
final IterableIdentifiableCollection<Portal> portals = getPortals();
for (Portal portal : portals)
{
@@ -545,7 +547,7 @@
final String siteStringId = id.getComponent(NAVIGATION_SITE_COMPONENT);
final Id<Site> siteId = SITE_CONTEXT.parse(siteStringId, Site.class);
final Site site = getSite(siteId, null);
- result = site.getNavigation().get(id.toString()); //todo: this probably doesn't work correctly
+ result = site.getNavigation().get(id.getComponent(NAVIGATION_COMPONENT)); //todo: this probably doesn't work correctly
}
else
{
13 years, 5 months
gatein SVN: r7019 - portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 04:21:51 -0400 (Tue, 09 Aug 2011)
New Revision: 7019
Modified:
portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
Log:
- Better link color.
Modified: portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
===================================================================
--- portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java 2011-08-09 08:10:17 UTC (rev 7018)
+++ portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java 2011-08-09 08:21:51 UTC (rev 7019)
@@ -96,7 +96,7 @@
int size = children.size();
boolean isLeaf = size == 0;
writer.println("<li>"
- + (isLeaf ? "<a style='font-weight: bold; text-decoration: underline; color: #c6efcf;' href='" + node.getURI() + "'>" : "")
+ + (isLeaf ? "<a style='font-weight: bold; text-decoration: underline; color: #336666;' href='" + node.getURI() + "'>" : "")
+ node.getDisplayName()
+ (isLeaf ? "</a>" : "")
+ "</li>");
13 years, 5 months
gatein SVN: r7018 - in portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl: portal and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 04:10:17 -0400 (Tue, 09 Aug 2011)
New Revision: 7018
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
Log:
- Added originating site component to Navigation ids to make it easier to resolve, though it's still not enough at the moment.
- Added Category, ManagedContent and Navigation to GateIn.get(Id). Resolving Navigation doesn't work at the moment.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:05:23 UTC (rev 7017)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09 08:10:17 UTC (rev 7018)
@@ -63,6 +63,7 @@
import org.gatein.api.id.GenericContext;
import org.gatein.api.id.Id;
import org.gatein.api.id.Identifiable;
+import org.gatein.api.portal.Navigation;
import org.gatein.api.portal.Page;
import org.gatein.api.portal.Portal;
import org.gatein.api.portal.Site;
@@ -119,17 +120,28 @@
.requiredComponent(SITE_NAME_COMPONENT, Site.class, Pattern.compile("(" + GROUP_CHARS + "|\\/)+"))
.optionalComponent("page", Page.class, Pattern.compile("\\w+"))
.withDefaultSeparator("::").build();
- public static final Context GROUP_CONTEXT = GenericContext.builder().named("Group").requiredUnboundedHierarchicalComponent("group", Identifiable.class, Pattern.compile("(" + GROUP_CHARS + ")+"))
+ public static final Context GROUP_CONTEXT = GenericContext.builder().named("Group")
+ .requiredUnboundedHierarchicalComponent("group", Identifiable.class, Pattern.compile("(" + GROUP_CHARS + ")+"))
.withDefaultSeparator("/").requireSeparatorInFirstPosition().build();
- private static final Context GADGET_CONTEXT = GenericContext.builder().named("Gadget").requiredComponent("name", Gadget.class, Pattern.compile("\\w+")).build();
- private static final Context USER_CONTEXT = GenericContext.builder().named("User").requiredComponent("name", Identifiable.class, Pattern.compile("[a-zA-Z0-9]+")).build();
- private static final Context CATEGORY_CONTEXT = GenericContext.builder().named("Category").requiredComponent("name", Category.class, Pattern.compile("\\w+")).build();
+ private static final Context GADGET_CONTEXT = GenericContext.builder().named("Gadget")
+ .requiredComponent("name", Gadget.class, Pattern.compile("\\w+")).build();
+ private static final Context USER_CONTEXT = GenericContext.builder().named("User")
+ .requiredComponent("name", Identifiable.class, Pattern.compile("[a-zA-Z0-9]+")).build();
+ private static final Context CATEGORY_CONTEXT = GenericContext.builder().named("Category")
+ .requiredComponent("name", Category.class, Pattern.compile("\\w+")).build();
public static final Context MANAGED_CONTENT_CONTEXT = GenericContext.builder().named("ManagedContent")
.requiredComponent(CATEGORY_COMPONENT, Category.class, Pattern.compile("\\w+"))
.requiredComponent("name", ManagedContent.class, Pattern.compile("(" + GROUP_CHARS + "|\\.)+"))
.requiredComponent("content", Content.class, Pattern.compile(".+"))
.withDefaultSeparator(":")
.build();
+ public static final String NAVIGATION_COMPONENT = "navigation";
+ public static final String NAVIGATION_SITE_COMPONENT = "site id";
+ public final static Context NAVIGATION_CONTEXT = GenericContext.builder().named("Navigation")
+ .requiredComponent(NAVIGATION_SITE_COMPONENT, Site.class, Pattern.compile("(" + GROUP_CHARS + "|::|\\/)+"))
+ .requiredComponent(NAVIGATION_COMPONENT, Navigation.class, Pattern.compile("[a-z0-9]+"))
+ .withDefaultSeparator("@")
+ .build();
private ExoContainer container;
private ModelDataStorage dataStorage;
@@ -510,6 +522,31 @@
}
}
}
+ else if (Category.class.equals(type))
+ {
+ final IterableIdentifiableCollection<Portal> portals = getPortals();
+ for (Portal portal : portals)
+ {
+ result = portal.getContentRegistry().getCategory(id.toString());
+ if (result != null)
+ {
+ break;
+ }
+ }
+ }
+ else if (ManagedContent.class.equals(type))
+ {
+ final String categoryId = id.getComponent(CATEGORY_COMPONENT);
+ final Category category = get(categoryId(categoryId));
+ result = category.getManagedContent(id.getComponent("name"));
+ }
+ else if (Navigation.class.equals(type))
+ {
+ final String siteStringId = id.getComponent(NAVIGATION_SITE_COMPONENT);
+ final Id<Site> siteId = SITE_CONTEXT.parse(siteStringId, Site.class);
+ final Site site = getSite(siteId, null);
+ result = site.getNavigation().get(id.toString()); //todo: this probably doesn't work correctly
+ }
else
{
// todo: finish support of other types
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-08-09 08:05:23 UTC (rev 7017)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-08-09 08:10:17 UTC (rev 7018)
@@ -36,8 +36,6 @@
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.services.resources.ResourceBundleManager;
import org.gatein.api.GateIn;
-import org.gatein.api.id.Context;
-import org.gatein.api.id.GenericContext;
import org.gatein.api.id.Id;
import org.gatein.api.id.Identifiable;
import org.gatein.api.portal.Navigation;
@@ -56,7 +54,6 @@
import java.util.Iterator;
import java.util.Locale;
import java.util.ResourceBundle;
-import java.util.regex.Pattern;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
public class NavigationImpl implements Navigation, Identifiable<Navigation>
@@ -69,8 +66,6 @@
private String displayName;
private ResourceBundle bundle;
- private final static Context NAVIGATION_CONTEXT = GenericContext.builder().named("Navigation").requiredComponent("navigation", Navigation.class, Pattern.compile("[a-z0-9]+")).build();
-
public NavigationImpl(Id<Site> siteId, NodeContext<NavigationImpl> context, GateInImpl gateIn)
{
this.context = context;
@@ -266,7 +261,7 @@
{
if (id == null)
{
- id = NAVIGATION_CONTEXT.create(Navigation.class, context.getId());
+ id = GateInImpl.NAVIGATION_CONTEXT.create(Navigation.class, site.toString(), context.getId());
}
return id;
13 years, 5 months
gatein SVN: r7017 - portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-08-09 04:05:23 -0400 (Tue, 09 Aug 2011)
New Revision: 7017
Modified:
portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
Log:
- Minor improvements to make it more obvious that there are links that can be clicked.
Modified: portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
===================================================================
--- portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java 2011-08-09 07:12:55 UTC (rev 7016)
+++ portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java 2011-08-09 08:05:23 UTC (rev 7017)
@@ -96,7 +96,7 @@
int size = children.size();
boolean isLeaf = size == 0;
writer.println("<li>"
- + (isLeaf ? "<a href='" + node.getURI() + "'>" : "")
+ + (isLeaf ? "<a style='font-weight: bold; text-decoration: underline; color: #c6efcf;' href='" + node.getURI() + "'>" : "")
+ node.getDisplayName()
+ (isLeaf ? "</a>" : "")
+ "</li>");
13 years, 5 months