Commit 3449b9a7 authored by Elias Englmeier's avatar Elias Englmeier
Browse files

changed the display name

parent 205a03b2
package comment.portlet;
import comment.constants.commentPortletKeys;
import ideaService.model.Ideas;
import ideaService.service.IdeasLocalServiceUtil;
import projectService.service.ProjectLocalServiceUtil;
import com.liferay.asset.kernel.model.AssetEntry;
import com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
import com.liferay.portal.kernel.theme.ThemeDisplay;
import com.liferay.portal.kernel.util.WebKeys;
import java.io.IOException;
import javax.portlet.ActionRequest;
......@@ -23,6 +11,15 @@ import javax.portlet.RenderResponse;
import org.osgi.service.component.annotations.Component;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
import com.liferay.portal.kernel.theme.ThemeDisplay;
import com.liferay.portal.kernel.util.WebKeys;
import comment.constants.commentPortletKeys;
import ideaService.model.Ideas;
import ideaService.service.IdeasLocalServiceUtil;
/**
* @author singh
*/
......@@ -31,7 +28,7 @@ import org.osgi.service.component.annotations.Component;
property = {
"com.liferay.portlet.display-category=category.EEN",
"com.liferay.portlet.instanceable=true",
"javax.portlet.display-name=commentModule",
"javax.portlet.display-name=Kommentare",
"javax.portlet.init-param.template-path=/",
"javax.portlet.init-param.view-template=/view.jsp",
"javax.portlet.name=" + commentPortletKeys.comment,
......@@ -45,23 +42,22 @@ public class commentPortlet extends MVCPortlet {
public void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException {
try{
ThemeDisplay themeDisplay = ((ThemeDisplay)(renderRequest.getAttribute(WebKeys.THEME_DISPLAY)));
long currentUserId = themeDisplay.getUserId();
long layoutRef = (themeDisplay.getLayout().getPrimaryKey());
Ideas idea = IdeasLocalServiceUtil.getIdeasByLayoutIdRef(layoutRef);
renderRequest.setAttribute("classPK", idea.getIdeasId());
renderRequest.setAttribute("userID", themeDisplay.getUserId());
renderRequest.setAttribute("currentURL", themeDisplay.getURLCurrent());
renderRequest.setAttribute("className", Ideas.class.getName());
}catch(Exception ex){
System.out.println(ex);
}
super.doView(renderRequest, renderResponse);
}
@SuppressWarnings("deprecation")
public void commentTestSubmit(ActionRequest request, ActionResponse response)throws PortletException, SystemException {
try{
......
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