url.append(QUERY_STRING_SEPARATOR).append(queryString);
hasQueryString = true;
}
FacesContext context = FacesContext.getCurrentInstance();
ClientWindow cw = context.getExternalContext().getClientWindow();
boolean appendClientWindow = false;
if (null != cw) {
appendClientWindow = cw.isClientWindowRenderModeEnabled(context);
}
if (appendClientWindow && -1 == url.indexOf(ResponseStateManager.CLIENT_WINDOW_URL_PARAM)) {
if (null != cw) {
String clientWindow = cw.getId();
if (!hasQueryString) {
url.append(QUERY_STRING_SEPARATOR);
} else {
url.append(PARAMETER_PAIR_SEPARATOR);
}
url.append(ResponseStateManager.CLIENT_WINDOW_URL_PARAM).append(PARAMETER_NAME_VALUE_SEPARATOR).append(clientWindow);
Map<String, String> additionalParams = cw.getQueryURLParameters(context);
if (null != additionalParams) {
for (Map.Entry<String, String> cur : additionalParams.entrySet()) {
url.append(PARAMETER_NAME_VALUE_SEPARATOR);
url.append(cur.getKey()).
append(UrlBuilder.PARAMETER_NAME_VALUE_SEPARATOR).