protected String getTargetRequestURL(FacesContext context, UIOutcomeTarget outcomeTarget) {
        HttpServletRequest req = (HttpServletRequest) context.getExternalContext().getRequest();
        String href = outcomeTarget.getHref();
        String requestURL = req.getRequestURL().toString();

        if (href != null) {
            return "#".equals(href) ? requestURL + "#" : href;
        }
        else {
            return LangUtils.substring(requestURL, 0, requestURL.length() - req.getRequestURI().length()) + getTargetURL(context, outcomeTarget);
        }
    }
Find all parameters to include by looking at nested uiparams and params of navigation case
primefaces/src/main/java/org/primefaces/renderkit/OutcomeTargetRenderer.java