use of org.apache.deltaspike.core.api.config.view.navigation.NavigationParameterContext in project deltaspike by apache.
the class JsfUtils method getViewConfigPageParameters.
public static Set<RequestParameter> getViewConfigPageParameters() {
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
Set<RequestParameter> result = new HashSet<RequestParameter>();
if (//detection of early config for different mojarra versions
externalContext == null || externalContext.getRequestParameterValuesMap() == null || externalContext.getRequest() == null) {
return result;
}
NavigationParameterContext navigationParameterContext = BeanProvider.getContextualReference(NavigationParameterContext.class);
for (Map.Entry<String, String> entry : navigationParameterContext.getPageParameters().entrySet()) {
//TODO add multi-value support
result.add(new RequestParameter(entry.getKey(), new String[] { entry.getValue() }));
}
return result;
}
Aggregations