// Despite the request was AJAX the panel has decided refreshing the full screen.
if (res != null && res.getClass().equals(ShowCurrentScreenResponse.class)) return res;
// Else return the response wrapped as AJAX.
PanelAjaxResponse response = PanelAjaxResponse.getEquivalentAjaxResponse(panel, res);
if (response == null) log.error("Cannot convert response with " + res.getClass() + " to PanelAjaxResponse.");
return response;
}