private static void renderHelper ( final WebXmlRenderContext renderContext , final Diagnosable component , final List < Diagnostic > diags , final int severity ) { if ( diags . isEmpty ( ) ) { return ; } XmlStringBuilder xml = renderContext . getWriter ( ) ; xml . appendTagOpen ( TAG_NAME ) ; xml . appendAttribute ( "id" , "_wc_" . concat ( UUID . randomUUID ( ) . toString ( ) ) ) ; xml . appendAttribute ( "type" , getLevel ( severity ) ) ; xml . appendAttribute ( "for" , component . getId ( ) ) ; xml . appendClose ( ) ; for ( Diagnostic diagnostic : diags ) { xml . appendTag ( MESSAGE_TAG_NAME ) ; xml . appendEscaped ( diagnostic . getDescription ( ) ) ; xml . appendEndTag ( MESSAGE_TAG_NAME ) ; } xml . appendEndTag ( TAG_NAME ) ; }
Render the diagnostics .