Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-tagcloud/src/java/com/finalist/portlets/tagcloud/portlet
In directory
james.mmbase.org:/tmp/cvs-serv3995/portlets-tagcloud/src/java/com/finalist/portlets/tagcloud/portlet
Modified Files:
TagRelatedPortlet.java TagCloudPortlet.java
Log Message:
CMSC-1066 Worked on with implementing the tag cloud module
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-tagcloud/src/java/com/finalist/portlets/tagcloud/portlet
See also: http://www.mmbase.org/jira/browse/CMSC-1066
Index: TagRelatedPortlet.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-tagcloud/src/java/com/finalist/portlets/tagcloud/portlet/TagRelatedPortlet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- TagRelatedPortlet.java 23 Sep 2008 15:19:25 -0000 1.4
+++ TagRelatedPortlet.java 7 Oct 2008 12:05:00 -0000 1.5
@@ -38,15 +38,19 @@
String elementId = getRelatedElementId(req, window);
if (elementId != null) {
- List<Tag> tags =
TagCloudUtil.getRelatedTags(Integer.parseInt(elementId));
req.setAttribute("elementId", elementId);
+ if(req.getAttribute("loadTags") == null ||
req.getAttribute("loadTags").equals("true")) {
+ List<Tag> tags =
TagCloudUtil.getRelatedTags(Integer.parseInt(elementId));
req.setAttribute("tags", tags);
+ }
} else {
String channelId = getIdFromScreen(req, window,
"contentchannel");
if (channelId != null) {
- List<Tag> tags =
TagCloudUtil.getChannelRelatedTags(new Integer(channelId));
req.setAttribute("channelId", channelId);
+ if(req.getAttribute("loadTags") == null ||
req.getAttribute("loadTags").equals("true")) {
+ List<Tag> tags =
TagCloudUtil.getChannelRelatedTags(new Integer(channelId));
req.setAttribute("tags", tags);
+ }
} else {
String tag = getIdFromScreen(req, window,
"tag");
if (tag == null) {
@@ -54,12 +58,15 @@
}
if(tag != null) {
tag = tag.replaceAll("0x8", " ");
- List<Tag> tags =
TagCloudUtil.getTagRelatedTags(tag);
req.setAttribute("tag", tag);
+
+ if(req.getAttribute("loadTags") == null
|| req.getAttribute("loadTags").equals("true")) {
+ List<Tag> tags =
TagCloudUtil.getTagRelatedTags(tag);
req.setAttribute("tags", tags);
}
}
}
+ }
super.doView(req, res);
}
Index: TagCloudPortlet.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-tagcloud/src/java/com/finalist/portlets/tagcloud/portlet/TagCloudPortlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- TagCloudPortlet.java 18 Sep 2008 11:21:21 -0000 1.2
+++ TagCloudPortlet.java 7 Oct 2008 12:05:00 -0000 1.3
@@ -9,11 +9,10 @@
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import com.finalist.cmsc.portlets.AbstractContentPortlet;
import com.finalist.portlets.tagcloud.Tag;
import com.finalist.portlets.tagcloud.util.TagCloudUtil;
-public class TagCloudPortlet extends AbstractContentPortlet {
+public class TagCloudPortlet extends TagRelatedPortlet {
@Override
protected void doView(RenderRequest req, RenderResponse res)
@@ -26,6 +25,8 @@
List<Tag> tags = TagCloudUtil.getTags(max, orderBy, "up");
req.setAttribute("tags", tags);
+ req.setAttribute("loadTags", "false");
+
super.doView(req, res);
}
@@ -33,6 +34,7 @@
protected void saveParameters(ActionRequest request, String portletId) {
setPortletParameter(portletId, "param_max",
request.getParameter("param_max"));
setPortletParameter(portletId, "param_orderBy",
request.getParameter("param_orderBy"));
+ super.saveParameters(request, portletId);
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs