@ Override public void encodeEnd ( FacesContext context , UIComponent component ) throws IOException { if ( ! component . isRendered ( ) ) { return ; } PanelGrid panelGrid = ( PanelGrid ) component ; ResponseWriter writer = context . getResponseWriter ( ) ; boolean idHasBeenRendered = false ; String responsiveStyle = Responsive . getResponsiveStyleClass ( panelGrid , false ) ; if ( null != responsiveStyle ) { writer . startElement ( "div" , panelGrid ) ; writer . writeAttribute ( "class" , responsiveStyle . trim ( ) , null ) ; String clientId = panelGrid . getClientId ( ) ; writer . writeAttribute ( "id" , clientId , "id" ) ; idHasBeenRendered = true ; } generateContainerStart ( writer , panelGrid , idHasBeenRendered ) ; beginDisabledFieldset ( panelGrid , writer ) ; int [ ] columns = getColSpanArray ( panelGrid ) ; String [ ] columnClasses = getColumnClasses ( panelGrid , columns ) ; String [ ] rowClasses = getRowClasses ( panelGrid ) ; int row = 0 ; int column = 0 ; List < UIComponent > children = panelGrid . getChildren ( ) ; for ( UIComponent child : children ) { if ( 0 == column ) { generateRowStart ( writer , row , rowClasses , panelGrid ) ; } generateColumnStart ( child , columnClasses [ column ] , writer ) ; child . encodeAll ( context ) ; generateColumnEnd ( writer , columns [ column ] ) ; column ++ ; if ( column >= columns . length ) { generateRowEnd ( writer , row , rowClasses ) ; column = 0 ; row ++ ; } } if ( column != 0 ) { generateRowEnd ( writer , row , rowClasses ) ; column = 0 ; row ++ ; } endDisabledFieldset ( panelGrid , writer ) ; generateContainerEnd ( writer ) ; if ( null != responsiveStyle ) { writer . endElement ( "div" ) ; } Tooltip . activateTooltips ( context , panelGrid ) ; }
Renders the grid component and its children .