/** * This can be used to generate a HistoryToken from a URL path * * @param url * The typed URL path. If the browser is pushstate-enabled, this will be the URI path, otherwise it will be * the fragment identifier. * @return A HistoryToken with the parsed URL matching information. */ public HistoryToken parseURL(String url) { String context = Navigation.getAppContext(); if (!context.isEmpty() && !url.startsWith("/")) { context = context.substring(1); } if (url.startsWith(context)) { url = url.substring(context.length()); } return patternMatcher.parseURL(url); } }
/** * This can be used to generate a HistoryToken from a URL path * * @param url * The typed URL path. If the browser is pushstate-enabled, this will be the URI path, otherwise it will be * the fragment identifier. * @return A HistoryToken with the parsed URL matching information. */ public HistoryToken parseURL(String url) { String context = Navigation.getAppContext(); if (!context.isEmpty() && !url.startsWith("/")) { context = context.substring(1); } if (url.startsWith(context)) { url = url.substring(context.length()); } return patternMatcher.parseURL(url); } }