[kune-commits] r1282 - in trunk/src/main/java: cc/kune/core/client/tags cc/kune/core/shared/domain org/ourproject/kune/platf/server/manager
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Thu Mar 17 19:24:32 CET 2011
Author: vjrj_
Date: 2011-03-17 19:24:32 +0100 (Thu, 17 Mar 2011)
New Revision: 1282
Modified:
trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java
trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
Log:
tags widget
Modified: trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java 2011-03-17 18:03:05 UTC (rev 1281)
+++ trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java 2011-03-17 18:24:32 UTC (rev 1282)
@@ -34,11 +34,12 @@
private final FlowPanel flowPanel;
private final I18nTranslationService i18n;
+ private FlowPanel mainPanel;
@Inject
public TagsSummaryPanel(final I18nTranslationService i18n, final WsArmor ws) {
this.i18n = i18n;
- FlowPanel mainPanel = new FlowPanel();
+ mainPanel = new FlowPanel();
flowPanel = new FlowPanel();
flowPanel.setWidth("100%");
Label header = new Label(i18n.t("Tags"));
@@ -74,11 +75,11 @@
@Override
public void setVisible(boolean visible) {
- flowPanel.setVisible(visible);
+ mainPanel.setVisible(visible);
}
@Override
public Widget asWidget() {
- return flowPanel;
+ return mainPanel;
}
}
Modified: trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java 2011-03-17 18:03:05 UTC (rev 1281)
+++ trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java 2011-03-17 18:24:32 UTC (rev 1282)
@@ -19,6 +19,7 @@
*/
package cc.kune.core.shared.domain;
+import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.rpc.IsSerializable;
@@ -29,6 +30,7 @@
private int minValue;
public TagCloudResult() {
+ this(new ArrayList<TagCount>(), 0, 0);
}
public TagCloudResult(final List<TagCount> tagCountList, final int maxValue, final int minValue) {
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-17 18:03:05 UTC (rev 1281)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-17 18:24:32 UTC (rev 1282)
@@ -75,7 +75,11 @@
@Override
public TagCloudResult getTagCloudResultByGroup(final Group group) {
- return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
+ try {
+ return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
+ } catch (NoResultException e) {
+ return new TagCloudResult();
+ }
}
@Override
More information about the kune-commits
mailing list