我在 portlet.xml 中添加以下几行
<init-param>
<name>add-process-action-success-action</name>
<value>false</value>
</init-param>
但它不起作用...请帮助我..
最佳答案
在 Controller 操作中尝试此操作
// 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);
关于java - 如何从 Liferay Portlet 中删除默认消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35771047/