url = viewHandler.getActionURL(facesContext, link);
url = externalContext.encodeActionURL(url);
} else if (link.contains(":")) { // external link
url = link;
} else { // internal relative link
url = externalContext.encodeResourceURL(link);
}
StringBuilder builder = new StringBuilder(url);
boolean firstParameter = !url.contains("?");
for (UIComponent child : (List<UIComponent>) component.getChildren()) {