Examples of UIColumn


Examples of org.richfaces.component.UIColumn

        // RichHeaderEncodeStrategy();
        // HeaderEncodeStrategy simpleEncodeStrategy = new
        // SimpleHeaderEncodeStrategy();

        while (headers.hasNext()) {
            UIColumn column = headers.next();
            if (isColumnRendered(column)) {
                if ((Integer) column.getAttributes().get("colspan") != null) {
                    t_colCount = t_colCount
                            + ((Integer) column.getAttributes().get("colspan"))
                                    .intValue();
                } else {
                    t_colCount++;
                }
                if (t_colCount > colCount) {
                    break;
                }

                String classAttribute = facetName + "Class";
                String columnHeaderClass = (String) column.getAttributes().get(
                        classAttribute);

                writer.startElement(element, column);
                encodeStyleClass(writer, null, skinCellClass, headerClass,
                        columnHeaderClass);
                writer.writeAttribute("scope", "col", null);
                getUtils().encodeAttribute(context, column, "colspan");

                boolean sortableColumn = column
                        .getValueExpression("comparator") != null
                        || column.getValueExpression("sortBy") != null;
                column.getAttributes().put("sortable",
                        Boolean.valueOf(sortableColumn));

                HeaderEncodeStrategy strategy = (column instanceof UIColumn && "header"
                        .equals(facetName)) ? new G3HeaderEncodeStrategy()
                        : new SimpleHeaderEncodeStrategy();

                strategy.encodeBegin(context, writer, column, facetName,
                        sortableColumn);

                UIComponent facet = column.getFacet(facetName);
                if (facet != null && isColumnRendered(facet)) {
                    renderChild(context, facet);
                }

                strategy.encodeEnd(context, writer, column, facetName,
View Full Code Here

Examples of org.richfaces.component.UIColumn

        UIExtendedDataTable table = holder.getTable();
        ResponseWriter writer = context.getResponseWriter();
        Iterator<UIColumn> iter = table.getSortedColumns();
        boolean first = true;
        int currentColumn = 0;
        UIColumn column = null;
        if (holder.isGroupingOn() && (rowGroupChanged(context, holder))) {
            if (holder.isFirstRow()) {
                encodeFakeIeRow(context, table, holder);
            }
            encodeGroupRow(context, table, holder);
        }
        holder.setFirstRow(false);
        while (iter.hasNext()) {
            column = iter.next();
            // Start new row for first column - expect a case of the detail
            // table, wich will be insert own row.
            boolean isRow = (column instanceof Row);
            if (first && !isRow) {
                encodeRowStart(context, getFirstRowSkinClass(), holder
                        .getRowClass(), table, holder, writer);
            }

            // TODO PKA CHANGE COLUMN RENDERER TO GET RID OF && false
            if (false && (column instanceof Column)) {
                boolean breakBefore = ((Column) column).isBreakBefore()
                        || isRow;
                if (breakBefore && !first) {
                    // close current row
                    writer.endElement(HTML.TR_ELEMENT);
                    // reset columns counter.
                    currentColumn = 0;
                    // Start new row, expect a case of the detail table, wich
                    // will be insert own row.
                    if (!isRow) {
                        holder.nextRow();
                        encodeRowStart(context, holder.getRowClass(), table,
                                holder, writer);
                    }
                }
                encodeCellChildren(context, column,
                        first ? getFirstRowSkinClass() : null,
                        getRowSkinClass(), holder.getRowClass(),
                        getCellSkinClass(), holder
                                .getColumnClass(currentColumn));
                // renderChild(context, column);
                if (isRow && iter.hasNext()) {
                    // Start new row for remained columns.
                    holder.nextRow();
                    encodeRowStart(context, holder.getRowClass(), table,
                            holder, writer);
                    // reset columns counter.
                    currentColumn = -1;
                }
            } else if (column.isRendered()) {
                // UIColumn don't have own renderer
                writer.startElement(HTML.td_ELEM, table);
                getUtils().encodeId(context, column);
                encodeStyleClass(writer, null, getCellSkinClass(), null, null);
                // TODO - encode column attributes.
View Full Code Here

Examples of org.richfaces.component.UIColumn

    public void encodeScriptIfNecessary(FacesContext context,
            UIExtendedDataTable table) throws IOException {
        boolean shouldRender = false;
        Iterator<UIColumn> columns = table.getSortedColumns();
        while (columns.hasNext() && !shouldRender) {
            UIColumn next = columns.next();
            shouldRender = next.isSortable();
            shouldRender = true;// shouldRender || (next instanceof
            // HtmlDataColumn);
        }
        shouldRender = true;
        if (shouldRender) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.