PmJsfUtil { public static String relUrlForNaviLink(NaviLink naviLink, boolean withVersion) { String uiParam = null; if (naviLink instanceof NaviLinkImpl) { Map<String, Object> uiParams = ((NaviLinkImpl)naviLink).getParams(); uiParam = PmJsfUtil.URL_PARAM_CODER.mapToParamValue(uiParams); } String url = NaviJsfUtil.makeUrl(new UrlInfo(naviLink.getPath(), naviLink.getPosOnPage()), uiParam, withVersion); return url; }  static SelectItem[] makeSelectItems(PmAttr<?> pmAttr); static Object getProperty(PmObject pm, String propName); static List<PmMessage> registerPmMessagesForCleanup(PmConversation pmConversation); static String uriForNaviLink(PmObject pm, NaviLink naviLink); static String relUrlForNaviLink(NaviLink naviLink, boolean withVersion); static String urlForPopupNaviLink(PmObject pm, NaviLink naviLink); static String uriForNaviLinkWithoutVersion(PmObject pm, NaviLink naviLink); static String hiddenFieldsForRequestParams(); static String getPmReqestParamKey(); static String getPmReqestParamValue(); static String readPm4jParamValue(String paramName); static Map<String, Object> getPmRequestParamMap(); static Map<String, Object> getPmRequestParamMap(HttpServletRequest request); static String readKeyLinkParam(); static Long readKeyLinkParamAsLong(); static final String PM4J_REQUEST_PARAM; static final String REQUEST_ATTR_MAP_CACHE; static UrlParamCoder URL_PARAM_CODER; }
@Test public void testRelUrlForNaviLink(){ NaviLink naviLink = new NaviLinkImpl("myPath", "myName", "myValue"); String url = PmJsfUtil.relUrlForNaviLink(naviLink, false); assertEquals("Test JSon String", "myPath?pm4j=%7B%22myName%22%3A%22myValue%22%7D", url); }