List of usage examples for com.liferay.portal.kernel.util WebKeys MESSAGE_BOARDS_MESSAGE_DISPLAY
String MESSAGE_BOARDS_MESSAGE_DISPLAY
To view the source code for com.liferay.portal.kernel.util WebKeys MESSAGE_BOARDS_MESSAGE_DISPLAY.
Click Source Link
From source file:com.liferay.message.boards.web.internal.portlet.action.GetMessagesMVCResourceCommand.java
License:Open Source License
@Override protected void doServeResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws Exception { MBMessageDisplay messageDisplay = ActionUtil.getMessageDisplay(resourceRequest); resourceRequest.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE_DISPLAY, messageDisplay); int index = ParamUtil.getInteger(resourceRequest, "index"); resourceRequest.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_INDEX, index); PortletRequestDispatcher portletRequestDispatcher = getPortletRequestDispatcher(resourceRequest, "/message_boards/view_message_content_resources.jsp"); portletRequestDispatcher.include(resourceRequest, resourceResponse); }
From source file:com.liferay.message.boards.web.internal.portlet.action.ViewMessageMVCRenderCommand.java
License:Open Source License
@Override public String render(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException { try {/*w w w .j a v a 2 s . c o m*/ MBMessageDisplay messageDisplay = ActionUtil.getMessageDisplay(renderRequest); renderRequest.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE_DISPLAY, messageDisplay); return "/message_boards/view_message.jsp"; } catch (NoSuchMessageException | PrincipalException e) { SessionErrors.add(renderRequest, e.getClass()); return "/message_boards/error.jsp"; } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new PortletException(e); } }
From source file:com.liferay.message.boards.web.internal.trash.MBThreadTrashRenderer.java
License:Open Source License
@Override public boolean include(HttpServletRequest request, HttpServletResponse response, String template) throws Exception { MBMessageDisplay messageDisplay = MBMessageServiceUtil.getMessageDisplay(_rootMessage.getMessageId(), WorkflowConstants.STATUS_ANY); request.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE_DISPLAY, messageDisplay); MBTreeWalker treeWalker = messageDisplay.getTreeWalker(); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, messageDisplay.getCategory()); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, treeWalker.getRoot()); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, Integer.valueOf(0)); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.FALSE); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, _rootMessage); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, messageDisplay.getThread()); return super.include(request, response, template); }
From source file:com.liferay.message.boards.web.trash.MBThreadTrashRenderer.java
License:Open Source License
@Override public boolean include(HttpServletRequest request, HttpServletResponse response, String template) throws Exception { MBMessageDisplay messageDisplay = MBMessageServiceUtil.getMessageDisplay(_rootMessage.getMessageId(), WorkflowConstants.STATUS_ANY); request.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE_DISPLAY, messageDisplay); MBTreeWalker treeWalker = messageDisplay.getTreeWalker(); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER, treeWalker); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CATEGORY, messageDisplay.getCategory()); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_CUR_MESSAGE, treeWalker.getRoot()); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_DEPTH, Integer.valueOf(0)); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_LAST_NODE, Boolean.FALSE); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_SEL_MESSAGE, _rootMessage); request.setAttribute(WebKeys.MESSAGE_BOARDS_TREE_WALKER_THREAD, messageDisplay.getThread()); return super.include(request, response, template); }