Commit faf959e5 authored by Elias Englmeier's avatar Elias Englmeier
Browse files

improved map

parent 3bc48173
......@@ -22,6 +22,7 @@ import com.liferay.portal.kernel.util.WebKeys;
import MapModule.constants.MapModulePortletKeys;
import ideaService.model.Ideas;
import ideaService.service.IdeasLocalServiceUtil;
import ideaService.service.persistence.IdeasUtil;
import projectService.service.ProjectLocalServiceUtil;
/**
......@@ -72,13 +73,16 @@ public class MapModulePortlet extends MVCPortlet {
renderRequest.setAttribute("allIdeas", result);
}
else{
else if (IdeasLocalServiceUtil.getIdeasByLayoutIdRef(themeDisplay.getLayout().getPrimaryKey()) != null){
ArrayList<Ideas> tmp = new ArrayList<Ideas>();
Ideas i = IdeasLocalServiceUtil.getIdeasByLayoutIdRef(themeDisplay.getLayout().getPrimaryKey());
tmp.add(i);
renderRequest.setAttribute("allIdeas",
JSONFactoryUtil.looseSerializeDeep(tmp));
}
else{
renderRequest.setAttribute("allIdeas",JSONFactoryUtil.looseSerializeDeep(IdeasUtil.findAll()));
}
super.render(renderRequest, renderResponse);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment