// If the modal window is on then show it.
// The AJAX response varies depending whether the modal window is rendered for the first time or
// it's a response inside the modal window.
if (modalOn) {
if (modalSwitchedOn) getControllerStatus().setResponse(new ShowComponentAjaxResponse(modalDialog));
else getControllerStatus().setResponse(new ShowComponentAjaxResponse(modalDialog.getCurrentComponent()));
}
return true;
}