use of org.apache.wicket.validation.validator.UrlValidator in project openmeetings by apache.
the class Application method urlForPage.
public static String urlForPage(Class<? extends Page> clazz, PageParameters pp, String _baseUrl) {
RequestCycle rc = RequestCycle.get();
String baseUrl = getBaseUrl();
if (!new UrlValidator(new String[] { "http", "https" }).isValid(baseUrl) && !Strings.isEmpty(_baseUrl)) {
baseUrl = _baseUrl;
}
return rc.getUrlRenderer().renderFullUrl(Url.parse(baseUrl + rc.mapUrlFor(clazz, pp)));
}
Aggregations