如何从Liferay Portlet中删除默认消息

时间:2016-03-03 11:32:47

标签: java liferay liferay-6

我在portlet.xml中添加以下行

<init-param>
  <name>add-process-action-success-action</name>
  <value>false</value>
</init-param>

但它不起作用...请帮帮我..

1 个答案:

答案 0 :(得分:2)

在您的控制器操作中尝试此操作

// Hiding the default Error Message
    PortletConfig portletConfig = (PortletConfig) request.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
    LiferayPortletConfig liferayPortletConfig = (LiferayPortletConfig) portletConfig;
    SessionMessages.add(request, liferayPortletConfig.getPortletId()
                    + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
相关问题