StateManager stateManager = application.getStateManager();
if(! (stateManager instanceof AjaxStateManager)){
if(log.isDebugEnabled()){
log.debug("Set AjaxStateManager on top of chain");
}
application.setStateManager(new AjaxStateManager(stateManager));
}
ViewHandler viewHandler = application.getViewHandler();
if (!(viewHandler instanceof AjaxViewHandler)) {
if(log.isDebugEnabled()){
log.debug("Set AjaxViewHandler on top of chain");