List of usage examples for com.liferay.portal.kernel.util HttpUtil encodePath
public static String encodePath(String path)
From source file:com.liferay.layout.taglib.servlet.taglib.LayoutsTreeTag.java
License:Open Source License
protected JSONArray getPortletURLsJSONArray(Map<String, PortletURL> portletURLs) { JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); if (MapUtil.isEmpty(portletURLs)) { return jsonArray; }/* w w w. j av a 2 s .co m*/ for (Map.Entry<String, PortletURL> entry : portletURLs.entrySet()) { JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); jsonObject.put("name", entry.getKey()); PortletURL portletURL = entry.getValue(); portletURL.setParameter("selPlid", "{selPlid}"); jsonObject.put("value", StringUtil.replace(portletURL.toString(), HttpUtil.encodePath("{selPlid}"), "{selPlid}")); jsonArray.put(jsonObject); } return jsonArray; }