Example usage for com.liferay.portal.kernel.util WebKeys MESSAGE_BOARDS_MESSAGE

List of usage examples for com.liferay.portal.kernel.util WebKeys MESSAGE_BOARDS_MESSAGE

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util WebKeys MESSAGE_BOARDS_MESSAGE.

Prototype

String MESSAGE_BOARDS_MESSAGE

To view the source code for com.liferay.portal.kernel.util WebKeys MESSAGE_BOARDS_MESSAGE.

Click Source Link

Usage

From source file:com.liferay.message.boards.web.internal.asset.MBMessageAssetRenderer.java

License:Open Source License

@Override
public boolean include(HttpServletRequest request, HttpServletResponse response, String template)
        throws Exception {

    request.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE, _message);

    return super.include(request, response, template);
}

From source file:com.liferay.message.boards.web.internal.portlet.action.GetMessageMVCRenderCommand.java

License:Open Source License

@Override
public String render(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException {

    try {/*from   w  ww. j av  a  2 s .  c  o  m*/
        MBMessage message = ActionUtil.getMessage(renderRequest);

        renderRequest.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE, message);
    } 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);
    }

    return getPath();
}

From source file:com.liferay.message.boards.web.internal.portlet.action.MoveThreadMVCRenderCommand.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  . com
        MBMessage threadMessage = ActionUtil.getThreadMessage(renderRequest);

        renderRequest.setAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE, threadMessage);
    } 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);
    }

    return "/message_boards/move_thread.jsp";
}