@ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { WDataTable table = ( WDataTable ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; xml . appendTagOpen ( "ui:table" ) ; xml . appendAttribute ( "id" , component . getId ( ) ) ; xml . appendOptionalAttribute ( "track" , component . isTracking ( ) , "true" ) ; xml . appendOptionalAttribute ( "hidden" , table . isHidden ( ) , "true" ) ; xml . appendOptionalAttribute ( "caption" , table . getCaption ( ) ) ; switch ( table . getType ( ) ) { case TABLE : xml . appendAttribute ( "type" , "table" ) ; break ; case HIERARCHIC : xml . appendAttribute ( "type" , "hierarchic" ) ; break ; default : throw new SystemException ( "Unknown table type: " + table . getType ( ) ) ; } switch ( table . getStripingType ( ) ) { case ROWS : xml . appendAttribute ( "striping" , "rows" ) ; break ; case COLUMNS : xml . appendAttribute ( "striping" , "cols" ) ; break ; case NONE : break ; default : throw new SystemException ( "Unknown striping type: " + table . getStripingType ( ) ) ; } switch ( table . getSeparatorType ( ) ) { case HORIZONTAL : xml . appendAttribute ( "separators" , "horizontal" ) ; break ; case VERTICAL : xml . appendAttribute ( "separators" , "vertical" ) ; break ; case BOTH : xml . appendAttribute ( "separators" , "both" ) ; break ; case NONE : break ; default : throw new SystemException ( "Unknown separator type: " + table . getSeparatorType ( ) ) ; } xml . appendClose ( ) ; if ( table . getPaginationMode ( ) != PaginationMode . NONE ) { paintPaginationElement ( table , xml ) ; } if ( table . getSelectMode ( ) != SelectMode . NONE ) { paintRowSelectionElement ( table , xml ) ; } if ( table . getExpandMode ( ) != ExpandMode . NONE ) { paintRowExpansionElement ( table , xml ) ; } if ( table . isSortable ( ) ) { paintSortElement ( table , xml ) ; } paintColumnHeadings ( table , renderContext ) ; paintRows ( table , renderContext ) ; paintTableActions ( table , renderContext ) ; xml . appendEndTag ( "ui:table" ) ; }
Paints the given WDataTable .