Created
February 21, 2020 22:43
-
-
Save evaldeslacasa/14e5eba68a1c0d56a19db30813872d6f to your computer and use it in GitHub Desktop.
Method to add parameters in URLs for Liferay
This file contains 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
protected static String addParameterWithPortletNamespace( | |
String url, String name, String value) { | |
String portletId = HttpUtil.getParameter(url, "p_p_id", false); | |
if (Validator.isNotNull(portletId)) { | |
name = PortalUtil.getPortletNamespace(portletId) + name; | |
} | |
return HttpUtil.addParameter(url, name, value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment