diff --git a/.classpath b/.classpath index 63fb0eb..f6157f5 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -30,5 +30,5 @@ - + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index f0782f7..cfd2425 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 jarsExcludedFromWebInfLib= -lastWarOutDir=/Users/massi/Documents/workspace/top-topics/target/top-topics-1.0.0-SNAPSHOT +lastWarOutDir=/Users/massi/Documents/workspace/top-topics/target/top-topics-1.0.1-SNAPSHOT warSrcDir=src/main/webapp warSrcDirIsOutput=false diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 01d0932..f85d29f 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -4,6 +4,9 @@ + + uses + diff --git a/pom.xml b/pom.xml index 546b529..232fc43 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portlets.user top-topics war - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT Top Topics Portlet Top Topics Portle shows the top 10 topics in the scope where is deployed. @@ -59,7 +59,8 @@ org.gcube.portlets.user - gcube-widgets + gcube-widgets + compile org.gcube.portal diff --git a/src/main/java/org/gcube/portlets/user/topics/client/TopTopics.java b/src/main/java/org/gcube/portlets/user/topics/client/TopTopics.java index 84aa1f7..c36fdc0 100644 --- a/src/main/java/org/gcube/portlets/user/topics/client/TopTopics.java +++ b/src/main/java/org/gcube/portlets/user/topics/client/TopTopics.java @@ -1,8 +1,11 @@ package org.gcube.portlets.user.topics.client; +import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper; import org.gcube.portlets.user.topics.client.panel.TopicsPanel; import com.google.gwt.core.client.EntryPoint; +import com.google.gwt.user.client.Window.Location; +import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.RootPanel; /** * @@ -12,6 +15,15 @@ import com.google.gwt.user.client.ui.RootPanel; public class TopTopics implements EntryPoint { public void onModuleLoad() { - RootPanel.get("Trending-Topics-Container").add(new TopicsPanel()); + ClientScopeHelper.getService().setScope(Location.getHref(), new AsyncCallback() { + @Override + public void onSuccess(Boolean result) { + RootPanel.get("Trending-Topics-Container").add(new TopicsPanel()); + } + @Override + public void onFailure(Throwable caught) { + } + }); + } } diff --git a/src/main/java/org/gcube/portlets/user/topics/server/TopicServiceImpl.java b/src/main/java/org/gcube/portlets/user/topics/server/TopicServiceImpl.java index ce78923..e8532fd 100644 --- a/src/main/java/org/gcube/portlets/user/topics/server/TopicServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/topics/server/TopicServiceImpl.java @@ -25,7 +25,6 @@ import org.slf4j.LoggerFactory; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.liferay.portal.model.Organization; import com.liferay.portal.model.User; -import com.liferay.portal.service.UserLocalServiceUtil; /** * @author Massimiliano Assante, ISTI-CNR diff --git a/src/main/resources/org/gcube/portlets/user/topics/TopTopics.gwt.xml b/src/main/resources/org/gcube/portlets/user/topics/TopTopics.gwt.xml index 9114ef3..a75122d 100644 --- a/src/main/resources/org/gcube/portlets/user/topics/TopTopics.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/topics/TopTopics.gwt.xml @@ -2,8 +2,8 @@ - - + + diff --git a/src/main/webapp/TopTopics.css b/src/main/webapp/TopTopics.css index bf84988..42e452e 100644 --- a/src/main/webapp/TopTopics.css +++ b/src/main/webapp/TopTopics.css @@ -1,5 +1,5 @@ #Trending-Topics-Container { - margin-right: 20px; + margin-right: 10px; } .topic-title { diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 84454ed..b5d459d 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -5,20 +5,30 @@ - - - topicsServlet - org.gcube.portlets.user.topics.server.TopicServiceImpl - + + + topicsServlet + org.gcube.portlets.user.topics.server.TopicServiceImpl + + + scopeService + org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl + - - topicsServlet - /toptopics/topicservice - - - - TrendingTopics.html - + + topicsServlet + /toptopics/topicservice + + + + scopeService + /toptopics/scopeService + + + + + TrendingTopics.html +