Hiding the Default Error message
In the Liferay, when ever we get the exception by default error message will be displayed.
So how to remove that message as below?
Just add the below code at the class level where your excepting the error can occur. Code as follows as
Thats it , we have disabled the default error message.
Anyhow we are discussing about the error message, here we will discuss how to create the error message,
Creating the Error message in the Liferay.
In Class :
SessionErrors.add(actionRequest, "error-key");
In JSP:
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<liferay-ui:error key="error-key">
<liferay-ui:message key="validation-perference-exception" />
</liferay-ui:error>
Please add the code
ReplyDeletecheck now
Delete