Package javax.faces.component

Examples of javax.faces.component.UIColumn


    public boolean isHeaderExists(FacesContext facesContext, UIComponent component) {
        AbstractSelectManyComponent select = (AbstractSelectManyComponent) component;
        Iterator<UIColumn> columnIterator = select.columns();
        while (columnIterator.hasNext()) {
            UIColumn column = columnIterator.next();
            if (column.getFacet("header") != null) {
                return true;
            }
        }
        return false;
    }
View Full Code Here


                headerClass.append(select.getHeaderClass());
            }

            writer.writeAttribute("class", headerClass, null);
            while (headers.hasNext()) {
                UIColumn header = headers.next();
                writer.startElement("th", component);
                writer.writeAttribute("class", cellClass, null);
                UIComponent facet = header.getFacet("header");
                if (facet != null && facet.isRendered()) {
                    facet.encodeBegin(facesContext);
                    if (facet.getRendersChildren()) {
                        facet.encodeChildren(facesContext);
                    } else {
View Full Code Here

            columnClasses = new String[0];
        }
        int columnCounter = 0;
        Iterator<UIColumn> columnIterator = table.columns();
        while (columnIterator.hasNext()) {
            UIColumn column = columnIterator.next();
            if (column.isRendered()) {
                writer.startElement(HtmlConstants.TD_ELEM, table);

                Object width = column.getAttributes().get("width");
                if (width != null) {
                    writer.writeAttribute("style", "width: " + HtmlDimensions.formatSize(width.toString()), null);
                }

                String columnClass;
                if (columnClasses.length > 0) {
                    columnClass = HtmlUtil.concatClasses(cellClassName, columnClasses[columnCounter % columnClasses.length], column.getAttributes().get("styleClass"));
                } else {
                    columnClass = HtmlUtil.concatClasses(cellClassName, column.getAttributes().get("styleClass"));
                }
                writer.writeAttribute("class", columnClass, null);
                renderer.renderChildren(facesContext, column);
                writer.endElement(HtmlConstants.TD_ELEM);
                columnCounter++;
View Full Code Here

        nestedTable.setVar("nestedItem");

        createNestedTableData();
        nestedTable.setValue(nestedTableData);

        nestedTable.getChildren().add(new UIColumn());

        table.getChildren().get(0).getChildren().add(nestedTable);

        createNestedTableText();
        createNestedTableFooter();
View Full Code Here

        table.setVar("item");

        createTableData();
        table.setValue(tableData);

        table.getChildren().add(new UIColumn());

        form.getChildren().add(table);
        createNestedOutput();
        createNestedText();
        createNestedTable();
View Full Code Here

            while(parent != null && !((parent=parent.getParent())instanceof UIColumn));

            if(parent != null)
            {
                UIColumn column = (UIColumn) parent;

                if(column.getHeader()!=null)
                {
                    UIComponent header = column.getHeader();

                    return getComponentText(facesContext, header);
                }
            }
        }
View Full Code Here

                List children = newspaperTable.getChildren();
                for(int j = 0; j < newspaperTable.getChildCount(); j++) {
                    // skip this child if its not a rendered column
                    UIComponent child = (UIComponent)children.get(j);
                    if(!(child instanceof UIColumn)) continue;
                    UIColumn column = (UIColumn)child;
                    if(!child.isRendered()) continue;
                    // draw the element's cell
                    writer.startElement(HTML.TD_ELEM, newspaperTable);
                    if(styles.hasColumnStyle()) writer.writeAttribute(HTML.CLASS_ATTR, styles.getColumnStyle(j), null);
                    RendererUtils.renderChild(facesContext, child);
View Full Code Here

    private boolean hasFacet(HtmlNewspaperTable newspaperTable, boolean header) {
        for(Iterator it = newspaperTable.getChildren().iterator(); it.hasNext(); ) {
            // get the column
            UIComponent uiComponent = (UIComponent)it.next();
            if(!(uiComponent instanceof UIColumn)) continue;
            UIColumn column = (UIColumn)uiComponent;
            if(!column.isRendered()) continue;
           
            // test the facet
            if(header && ((UIColumn)uiComponent).getHeader() != null) return true;
            if(!header && ((UIColumn)uiComponent).getFooter() != null) return true;
        }
View Full Code Here

        int newspaperColumns = newspaperTable.getNewspaperColumns();
        for(int nc = 0; nc < newspaperColumns; nc++) {
            for(Iterator it = newspaperTable.getChildren().iterator(); it.hasNext(); ) {
                UIComponent uiComponent = (UIComponent)it.next();
                if(!(uiComponent instanceof UIColumn)) continue;
                UIColumn column = (UIColumn)uiComponent;
                if(!column.isRendered()) continue;
                // get the component to render
                UIComponent facet = null;
                if(header) facet = column.getHeader();
                else facet = column.getFooter();
                // do the rendering of the cells
                renderColumnHeaderOrFooterCell(facesContext, writer, column, styleClass, facet);
            }

            // draw the spacer facet
View Full Code Here

     */
    protected boolean hasFacet(boolean header, UIComponent uiComponent)
    {
        if (uiComponent instanceof UIColumn)
        {
            UIColumn uiColumn = (UIColumn) uiComponent;
            return header ? uiColumn.getHeader() != null : uiColumn.getFooter() != null;
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of javax.faces.component.UIColumn

Copyright © 2018 www.massapicom. 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.