How to disable default message: “Your request processed successfully”?

天涯浪子 提交于 2019-12-03 13:57:32
  1. 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>
    
  2. Alternatively it can also be changed for a particular action rather than 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 present in this link.

Hope this helps someone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!