PortalActionURL portalUrl = new PortalActionURL(uri);
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
Map<String, Object> ajaxParameters = ajaxContext.getCommonAjaxParameters();
if(null != ajaxParameters && ajaxParameters.size()>0){
for (Entry<String,Object> entry : ajaxParameters.entrySet()) {
portalUrl.addParameter(entry.getKey(), String.valueOf(entry.getValue()));
}
uri = portalUrl.toString();
}
} catch (MalformedURLException e) {
throw new FacesException("Bad resource URL ",e);