@ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { WList list = ( WList ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; WList . Type type = list . getType ( ) ; WList . Separator separator = list . getSeparator ( ) ; Size gap = list . getSpace ( ) ; String gapString = gap == null ? null : gap . toString ( ) ; xml . appendTagOpen ( "ui:panel" ) ; xml . appendAttribute ( "id" , component . getId ( ) ) ; xml . appendOptionalAttribute ( "class" , component . getHtmlClass ( ) ) ; xml . appendOptionalAttribute ( "track" , component . isTracking ( ) , "true" ) ; xml . appendOptionalAttribute ( "type" , list . isRenderBorder ( ) , "box" ) ; xml . appendClose ( ) ; // Render margin MarginRendererUtil . renderMargin ( list , renderContext ) ; xml . appendTagOpen ( "ui:listlayout" ) ; xml . appendOptionalAttribute ( "gap" , gapString ) ; if ( type != null ) { switch ( type ) { case FLAT : xml . appendAttribute ( "type" , "flat" ) ; break ; case STACKED : xml . appendAttribute ( "type" , "stacked" ) ; break ; case STRIPED : xml . appendAttribute ( "type" , "striped" ) ; break ; default : throw new SystemException ( "Unknown list type: " + type ) ; } } if ( separator != null ) { switch ( separator ) { case BAR : xml . appendAttribute ( "separator" , "bar" ) ; break ; case DOT : xml . appendAttribute ( "separator" , "dot" ) ; break ; case NONE : break ; default : throw new SystemException ( "Unknown list type: " + type ) ; } } xml . appendClose ( ) ; paintRows ( list , renderContext ) ; xml . appendEndTag ( "ui:listlayout" ) ; xml . appendEndTag ( "ui:panel" ) ; }
Paints the given WList .