Commit 3f635168 authored by Elias Englmeier's avatar Elias Englmeier
Browse files

replaced string by final string

parent 1aa3b925
......@@ -43,6 +43,8 @@ import projectService.service.ProjectLocalServiceUtil;
)
public class MapModulePortlet extends MVCPortlet {
private final static String ALL_IDEAS ="allIdeas";
@Override
public void render(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException{
ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
......@@ -74,18 +76,18 @@ public class MapModulePortlet extends MVCPortlet {
result = JSONFactoryUtil.looseSerializeDeep(IdeasLocalServiceUtil.getAllAccpetedIdeas());
}
renderRequest.setAttribute("allIdeas", result);
renderRequest.setAttribute(ALL_IDEAS, result);
}
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",
renderRequest.setAttribute(ALL_IDEAS,
JSONFactoryUtil.looseSerializeDeep(tmp));
}
else{
renderRequest.setAttribute("allIdeas",JSONFactoryUtil.looseSerializeDeep(IdeasLocalServiceUtil.getAllAccpetedIdeas()));
renderRequest.setAttribute(ALL_IDEAS,JSONFactoryUtil.looseSerializeDeep(IdeasLocalServiceUtil.getAllAccpetedIdeas()));
}
super.render(renderRequest, renderResponse);
......
Markdown is supported
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