private void handleRenderRedirect ( final PrintWriter writer ) { UIContext uic = UIContextHolder . getCurrent ( ) ; // Redirect user to error page LOG . warn ( "User will be redirected to " + redirectUrl ) ; // Setup response with redirect getResponse ( ) . setContentType ( WebUtilities . CONTENT_TYPE_XML ) ; writer . write ( XMLUtil . getXMLDeclarationWithThemeXslt ( uic ) ) ; writer . print ( "<ui:ajaxresponse " ) ; writer . print ( XMLUtil . UI_NAMESPACE ) ; writer . print ( ">" ) ; writer . print ( "<ui:ajaxtarget id=\"" + triggerId + "\" action=\"replace\">" ) ; // Redirect URL writer . print ( "<ui:redirect url=\"" + redirectUrl + "\" />" ) ; writer . print ( "</ui:ajaxtarget>" ) ; writer . print ( "</ui:ajaxresponse>" ) ; }
Redirect the user via the AJAX response .