How to disable the default message: "Your request has been processed successfully"?

How to disable this message by default: “Your request has been processed successfully” for my plug-in portlet when the add / update action is performed on my portlet?

I would also like to disable this for my custom configuration page ( configuration.jsp ), this is the configuration page that appears when we click on the wrench icon that appears in the upper right corner of each portlet.

Is there a configuration parameter anywhere that I can set, or some code that I can write to disable it?

Or is it possible to change the message from my user portlet and ConfigurationActionImpl ?

+8
liferay liferay-6
source share
1 answer
  • This message can be disabled for all actions in my portlet through the following configuration in portlet.xml :

     <init-param> <name>add-process-action-success-action</name> <value>false</value> </init-param> 
  • Alternatively, it can also be changed for a specific action, and not for all actions:

     public void addEmployee(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { // ... all the code processing String successMsg = "Employee added Successfully!"; SessionMessages.add(actionRequest, "request_processed", successMsg); } 

Thanks to the information provided in this link .

Hope this helps someone.

+19
source share

All Articles