Created
September 26, 2011 15:56
-
-
Save rotty3000/1242568 to your computer and use it in GitHub Desktop.
fix success message disabling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -22,6 +22,7 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil; | |
import com.liferay.portal.kernel.servlet.SessionErrors; | |
import com.liferay.portal.kernel.servlet.SessionMessages; | |
import com.liferay.portal.kernel.util.ContentTypes; | |
+import com.liferay.portal.kernel.util.GetterUtil; | |
import com.liferay.portal.kernel.util.JavaConstants; | |
import com.liferay.portal.kernel.util.ParamUtil; | |
import com.liferay.portal.kernel.util.StringPool; | |
@@ -168,6 +169,20 @@ public class PortletAction extends Action { | |
protected void addSuccessMessage( | |
ActionRequest actionRequest, ActionResponse actionResponse) { | |
+ HttpServletRequest request = PortalUtil.getHttpServletRequest( | |
+ actionRequest); | |
+ | |
+ PortletConfig portletConfig = (PortletConfig)request.getAttribute( | |
+ JavaConstants.JAVAX_PORTLET_CONFIG); | |
+ | |
+ boolean addProcessActionSuccessMessage = GetterUtil.getBoolean( | |
+ portletConfig.getInitParameter("add-process-action-success-action"), | |
+ true); | |
+ | |
+ if (!addProcessActionSuccessMessage) { | |
+ return; | |
+ } | |
+ | |
String successMessage = ParamUtil.getString( | |
actionRequest, "successMessage"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment