Renders the header cell content.
This method will render a checkbox in the header when {@link selectableRows} is greater than 1
or in case {@link selectableRows} is null when {@link CGridView::selectableRows} is greater than 1.
764716
protected function renderHeaderCellContent()
	{
		if ($this->grid->json) {
			if (trim($this->headerTemplate) === '') {
				return $this->grid->blankDisplay;
			}

			if ($this->selectableRows === null && $this->grid->selectableRows > 1) {
				$item = CHtml::checkBox($this->id . '_all', false, array('class' => 'select-on-check-all'));
			} else if ($this->selectableRows > 1) {
				$item = CHtml::checkBox($this->id . '_all', false);
			} else {
				ob_start();
				parent::renderHeaderCellContent();
				$item = ob_get_clean();
			}

			return strtr(
				$this->headerTemplate,
				array(
					'{item}' => $item,
				)
			);
		}
		parent::renderHeaderCellContent();
	}
340934
private void paintColumnHeadings(final WTable table, final WebXmlRenderContext renderContext) {
		XmlStringBuilder xml = renderContext.getWriter();
		int[] columnOrder = table.getColumnOrder();
		TableModel model = table.getTableModel();
		final int columnCount = columnOrder == null ? table.getColumnCount() : columnOrder.length;

		xml.appendTagOpen("ui:thead");
		xml.appendOptionalAttribute("hidden", !table.isShowColumnHeaders(), "true");
		xml.appendClose();

		for (int i = 0; i < columnCount; i++) {
			int colIndex = columnOrder == null ? i : columnOrder[i];
			WTableColumn col = table.getColumn(colIndex);

			if (col.isVisible()) {
				boolean sortable = model.isSortable(colIndex);
				paintColumnHeading(col, sortable, renderContext);
			}
		}

		xml.appendEndTag("ui:thead");
	}
606452
@Override
    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {
        // Save the supplied value to the date picker.
        setCellEditorValue(value);
        // Draw the appropriate background colors to indicate a selected or unselected state.
        if (isSelected) {
            if (matchTableSelectionBackgroundColor) {
                datePicker.getComponentDateTextField().setBackground(table.getSelectionBackground());
                datePicker.setBackground(table.getSelectionBackground());
            } else {
                datePicker.zDrawTextFieldIndicators();
            }
        }
        if (!isSelected) {
            if (matchTableBackgroundColor) {
                datePicker.getComponentDateTextField().setBackground(table.getBackground());
                datePicker.setBackground(table.getBackground());
            } else {
                datePicker.zDrawTextFieldIndicators();
            }
        }
        // Draw the appropriate borders to indicate a focused or unfocused state.
        if (hasFocus) {
            datePicker.setBorder(borderFocusedCell);
        } else {
            datePicker.setBorder(borderUnfocusedCell);
        }
        // If needed, adjust the minimum row height for the table.
        zAdjustTableRowHeightIfNeeded(table);
        // This fixes a bug where the date text could "move around" during a table resize event.
        datePicker.getComponentDateTextField().setScrollOffset(0);
        // Return the date picker component.
        return datePicker;
    }
1366176
private void paintRowSelectionElement(final WDataTable table, final XmlStringBuilder xml) {
		boolean multiple = table.getSelectMode() == SelectMode.MULTIPLE;

		xml.appendTagOpen("ui:rowselection");
		xml.appendOptionalAttribute("multiple", multiple, "true");

		if (multiple) {
			switch (table.getSelectAllMode()) {
				case CONTROL:
					xml.appendAttribute("selectAll", "control");
					break;
				case TEXT:
					xml.appendAttribute("selectAll", "text");
					break;
				case NONE:
					break;
				default:
					throw new SystemException("Unknown select-all mode: " + table.
							getSelectAllMode());
			}
		}

		xml.appendOptionalAttribute("groupName", table.getSelectGroup());
		xml.appendEnd();
	}
267208
void renderFormContent() {

        initLocaleSelect();
        setNativeResourceInfo(m_sitePath, m_locale);
        m_contentInfoHeader = new CmsInfoHeader(m_title, null, m_sitePath, m_locale, m_iconClasses);
        m_basePanel.add(m_contentInfoHeader);
        SimplePanel content = new SimplePanel();
        content.setStyleName(org.opencms.acacia.client.css.I_CmsLayoutBundle.INSTANCE.form().formParent());
        m_basePanel.add(content);
        initEntityObserver();
        if (m_definitions.get(m_locale).hasEditorChangeHandlers()) {
            initEditorChangeHandlers(m_definitions.get(m_locale).getEditorChangeScopes());
        }
        renderEntityForm(m_entityId, m_tabInfos, content, m_basePanel.getElement());
        if ((m_clientId != null) && (getFormTabs() != null)) {

            CmsListInfoBean pageInfo = CmsContainerpageController.get().getData().getPageInfo();
            m_pageInfoHeader = new CmsInfoHeader(
                pageInfo.getTitle(),
                null,
                pageInfo.getSubTitle(),
                CmsContainerpageController.get().getData().getLocale(),
                pageInfo.getBigIconClasses());
            updateInfoHeader(CmsContentDefinition.SETTINGS_TAB_ID.equals(getFormTabs().getSelectedId()));
            getFormTabs().addSelectionHandler(new SelectionHandler<Integer>() {

                public void onSelection(SelectionEvent<Integer> event) {

                    updateInfoHeader(CmsContentDefinition.SETTINGS_TAB_ID.equals(getFormTabs().getSelectedId()));
                }
            });
        }
    }
921788
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WDataTableRowRenderer renderer = (WDataTableRowRenderer) component;
		XmlStringBuilder xml = renderContext.getWriter();
		WDataTable table = renderer.getTable();
		TableDataModel dataModel = table.getDataModel();
		UIContext uic = UIContextHolder.getCurrent();

		final int numCols = table.getColumnCount();
		int[] columnOrder = table.getColumnOrder();
		int rowIndex = getRowIndex(table, (SubUIContext) uic);
		boolean unselectable = table.getSelectMode() != SelectMode.NONE
				&& !dataModel.isSelectable(rowIndex);

		xml.appendTagOpen("ui:tr");
		xml.appendAttribute("rowIndex", rowIndex);
		xml.appendOptionalAttribute("unselectable", unselectable, "true");
		xml.appendOptionalAttribute("selected", table.getSelectedRows().contains(rowIndex), "true");
		xml.appendOptionalAttribute("filterValues", getFilterValues(dataModel, rowIndex));

		if (table.getExpandMode() != WDataTable.ExpandMode.NONE && dataModel instanceof TreeTableDataModel) {
			TableTreeNode node = ((TreeTableDataModel) dataModel).getNodeAtLine(rowIndex);
			boolean expandable = !node.isLeaf() && !node.isExpanded();
			xml.appendOptionalAttribute("expandable", expandable, "true");
		}

		xml.appendClose();

		if (table.isShowRowHeaders()) {
			xml.appendTag("ui:th");
			renderer.getRowHeader().paint(renderContext);
			xml.appendEndTag("ui:th");
		}

		for (int i = 0; i < numCols; i++) {
			int colIndex = columnOrder == null ? i : columnOrder[i];
			WTableColumn col = table.getColumn(colIndex);

			if (col.isVisible()) {
				xml.appendTag("ui:td");
				renderer.getRenderer(colIndex).paint(renderContext);
				xml.appendEndTag("ui:td");
			}
		}

		if (table.getExpandMode() != WDataTable.ExpandMode.NONE && dataModel instanceof TreeTableDataModel) {
			TreeTableDataModel treeModel = (TreeTableDataModel) dataModel;
			TableTreeNode node = treeModel.getNodeAtLine(rowIndex);

			if (!node.isLeaf()) {
				xml.appendTagOpen("ui:subtr");
				xml.appendOptionalAttribute("open", node.isExpanded(), "true");
				xml.appendClose();

				if (node.isExpanded() || table.getExpandMode() == ExpandMode.CLIENT) {
					WRepeater repeater = table.getRepeater();

					// If there a renderer specified by any child, we only paint content that has a specified renderer
					boolean rendererPresent = false;

					for (Iterator<TreeNode> i = node.children(); !rendererPresent && i.hasNext();) {
						TableTreeNode child = (TableTreeNode) i.next();

						if (child.getRendererClass() != null) {
							rendererPresent = true;
						}
					}

					// Paint immediate children only.
					if (rendererPresent) {
						xml.appendTagOpen("ui:content");
						xml.appendOptionalAttribute("spanAllCols", node.isRendererSpansAllCols(),
								"true");
						xml.appendClose();

						for (Iterator<TreeNode> i = node.children(); i.hasNext();) {
							TableTreeNode child = (TableTreeNode) i.next();
							Integer rowId = child.getRowIndex() - 1;
							UIContext nodeContext = repeater.getRowContext(rowId);

							WComponent expandedRenderer = renderer.getExpandedTreeNodeRenderer(
									child.getRendererClass());

							if (expandedRenderer != null) {
								UIContextHolder.pushContext(nodeContext);

								try {
									expandedRenderer.paint(renderContext);
								} finally {
									UIContextHolder.popContext();
								}
							}
						}

						xml.appendEndTag("ui:content");
					} else {
						for (Iterator<TreeNode> i = node.children(); i.hasNext();) {
							TableTreeNode child = (TableTreeNode) i.next();
							Integer rowId = child.getRowIndex() - 1;
							UIContext nodeContext = repeater.getRowContext(rowId);

							UIContextHolder.pushContext(nodeContext);

							try {
								render(component, renderContext);
							} finally {
								UIContextHolder.popContext();
							}
						}
					}
				}

				xml.appendEndTag("ui:subtr");
			}
		}

		xml.appendEndTag("ui:tr");
	}
248617
private void renderCellToHeaderFooter(StringBuilder result, String bandName, BandElement bandElement, Object value, int gridRow, int row,
                              int column, int cols, int rowSpan, int colSpan, boolean isImage) {
    	    	
    	if (newRow) {
    		result.append("\r\n ");
    	} else {
    		result.append(" ");
    	}
    	boolean specialCell = false;
    	if (bandElement instanceof VariableBandElement)  {
        	VariableBandElement vbe = (VariableBandElement)bandElement;
        	Variable var = VariableFactory.getVariable(vbe.getVariable());        	
        	if (var instanceof PageNoVariable) {           		
        		specialCell = true;
        		result.append("&P");
        	} 
    	} else if (bandElement instanceof ExpressionBandElement)  {
         	// special case pageNo inside an expression
         	// bandName is not important here (it is used for groupRow computation)
    		PrefixSuffix pf = interpretPageNo(bandElement);
			if (pf != null) {
				result.append(pf.getPrefix()).append(" &P ").append(pf.getSuffix());     
				specialCell = true;
			}	
    	}
		if (!specialCell) {
			result.append(value);
		}				
    }
967514
function(item, tableRow) {
			mExplorer.SelectionRenderer.prototype.renderRow.call(this, item, tableRow);
			if (item.type !== "file") { //$NON-NLS-0$
				tableRow.classList.add("searchDetailRow"); //$NON-NLS-0$
			}
		}
1274476
public function renderHeader()
    {
        if ($this->title !== false) {
            echo CHtml::openTag('div', $this->htmlHeaderOptions);
            if ($this->title) {
                $this->title = '<h3>' . $this->title . '</h3>';

                if ($this->headerIcon) {
                    $this->title = '<i class="' . $this->headerIcon . '"></i>' . $this->title;
                }

                echo $this->title;
                $this->renderButtons();
            }
            echo CHtml::closeTag('div');
        }
    }
1372796
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WCheckBoxSelect select = (WCheckBoxSelect) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int cols = select.getButtonColumns();
		boolean readOnly = select.isReadOnly();

		xml.appendTagOpen("ui:checkboxselect");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", select.isHidden(), "true");
		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			int min = select.getMinSelect();
			int max = select.getMaxSelect();
			xml.appendOptionalAttribute("disabled", select.isDisabled(), "true");
			xml.appendOptionalAttribute("required", select.isMandatory(), "true");
			xml.appendOptionalAttribute("submitOnChange", select.isSubmitOnChange(), "true");
			xml.appendOptionalAttribute("toolTip", component.getToolTip());
			xml.appendOptionalAttribute("accessibleText", component.getAccessibleText());
			xml.appendOptionalAttribute("min", min > 0, min);
			xml.appendOptionalAttribute("max", max > 0, max);
		}
		xml.appendOptionalAttribute("frameless", select.isFrameless(), "true");

		switch (select.getButtonLayout()) {
			case COLUMNS:
				xml.appendAttribute("layout", "column");
				xml.appendOptionalAttribute("layoutColumnCount", cols > 0, cols);
				break;
			case FLAT:
				xml.appendAttribute("layout", "flat");
				break;
			case STACKED:
				xml.appendAttribute("layout", "stacked");
				break;
			default:
				throw new SystemException("Unknown layout type: " + select.getButtonLayout());
		}


		xml.appendClose();

		// Options
		List<?> options = select.getOptions();
		boolean renderSelectionsOnly = readOnly;

		if (options != null) {
			int optionIndex = 0;
			List<?> selections = select.getSelected();

			for (Object option : options) {
				if (option instanceof OptionGroup) {
					throw new SystemException("Option groups not supported in WCheckBoxSelect.");
				} else {
					renderOption(select, option, optionIndex++, xml, selections,
							renderSelectionsOnly);
				}
			}
		}
		if (!readOnly) {
			DiagnosticRenderUtil.renderDiagnostics(select, renderContext);
		}
		xml.appendEndTag("ui:checkboxselect");
	}
1128006
private void paintRows(final WTable table, final WebXmlRenderContext renderContext) {
		XmlStringBuilder xml = renderContext.getWriter();
		TableModel model = table.getTableModel();

		xml.appendTagOpen("ui:tbody");
		xml.appendAttribute("id", table.getId() + ".body");
		xml.appendClose();

		if (model.getRowCount() == 0) {
			xml.appendTag("ui:nodata");
			xml.appendEscaped(table.getNoDataMessage());
			xml.appendEndTag("ui:nodata");
		} else {
			// If has at least one visible col, paint the rows.
			final int columnCount = table.getColumnCount();

			for (int i = 0; i < columnCount; i++) {
				if (table.getColumn(i).isVisible()) {
					doPaintRows(table, renderContext);
					break;
				}
			}
		}

		xml.appendEndTag("ui:tbody");
	}
444964
public function renderHeaderCell()
	{
		if ($this->grid->json) {
			ob_start();
			$this->renderHeaderCellContent();
			$content = ob_get_contents();
			ob_end_clean();

			return array('id' => $this->id, 'content' => $content);
		}
		parent::renderHeaderCell();
		return array();
	}
351160
private void processRow(Example valuesRow, Example headers, Fixture rowFixtureAdapter) throws Exception
    {
        Statistics rowStats = new Statistics();

        for (int i = 0; i != valuesRow.remainings(); ++i)
        {
            Example cell = valuesRow.at( i );

            if (i < headers.remainings())
            {
                ExpectedColumn column = columns != null ? (ExpectedColumn) columns[i] :
                        CollectionHeaderForm.parse(headers.at(i).getContent()).selectColumn();
                chekOneCell(rowFixtureAdapter, rowStats, cell, column);
            }
            else
            {
                cell.annotate( ignored( cell.getContent() ) );
            }
        }
        applyRowStatistic(rowStats);
    }
1226976
public function renderBulkActions() {
		
        Booster::getBooster()->registerAssetJs('jquery.saveselection.gridview.js');
        $this->componentsAfterAjaxUpdate[] = "$.fn.yiiGridView.afterUpdateGrid('".$this->id."');";
		echo '<tr><td colspan="' . count($this->columns) . '">';
		$this->bulk->renderButtons();
		echo '</td></tr>';
	}
506666
public boolean isRowPresent(String searchElement) {
        ready();
        boolean found;
        GridCell cell = getCell(searchElement);
//        scrollTop(); // make sure always start from top then scroll down till the end of the page
//        do {
        // if the row is not in visible (need to scroll down - errors when used BufferView in grid)
        found = cell.isElementPresent();
//        } while(!found && scrollPageDown());

        return found;
    }
419895
public function renderHeaderCell()
	{
		$this->headerHtmlOptions['id']=$this->id;
		echo CHtml::openTag('th',$this->headerHtmlOptions);
		$this->renderHeaderCellContent();
		echo "</th>";
	}
527709
@Override
    public void renderHead(final IHeaderResponse response) {
        // select bootstrap tab for current theme selected
        int selectedTab = this.getSelectedTab();
        response.render(OnDomReadyHeaderItem.forScript("$('#themes li:eq("
                + selectedTab + ") a').tab('show');"));
    }