use of org.apache.wicket.settings.RequestCycleSettings in project wicket by apache.
the class AjaxHelloBrowser method getClientProperties.
/**
* A helper function that makes sure that gathering of extended browser info
* is not enabled when reading the ClientInfo's properties
*
* @return the currently available client info
*/
private ClientProperties getClientProperties() {
RequestCycleSettings requestCycleSettings = getApplication().getRequestCycleSettings();
boolean gatherExtendedBrowserInfo = requestCycleSettings.getGatherExtendedBrowserInfo();
ClientProperties properties = null;
try {
requestCycleSettings.setGatherExtendedBrowserInfo(false);
WebClientInfo clientInfo = (WebClientInfo) getSession().getClientInfo();
properties = clientInfo.getProperties();
} finally {
requestCycleSettings.setGatherExtendedBrowserInfo(gatherExtendedBrowserInfo);
}
return properties;
}
Aggregations