ExternalContext externalContext = context.getExternalContext();
HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
String url = this.helper.getUrl(context, component);
UrlData urlData = this.urlProcessor.createUrlData(url, "GET", request);
if (this.urlProcessor.isHdivStateNecessary(urlData)) {
boolean hasUIParams = UtilsJsf.hasUIParameterChild(component);
// if url hasn't got parameters, we do not have to include HDIV's state
if (!this.hdivConfig.isValidationInUrlsWithoutParamsActivated() && !urlData.containsParams()
&& !hasUIParams) {
// Do nothing
return;
}
IDataComposer dataComposer = HDIVUtil.getDataComposer(request);
dataComposer.beginRequest("GET", urlData.getUrlWithoutContextPath());
String processedParams = dataComposer.composeParams(urlData.getUrlParams(), "GET", Constants.ENCODING_UTF_8);
urlData.setUrlParams(processedParams);
String stateParam = dataComposer.endRequest();
String hdivParameter = (String) externalContext.getSessionMap().get(Constants.HDIV_PARAMETER);