Package org.openfaces.component.table

Examples of org.openfaces.component.table.Column


    public List<BaseColumn> getRenderedColumns() {
        FacesContext context = FacesContext.getCurrentInstance();
        List<BaseColumn> columns = TableUtil.getColumnsFromList(context, fileAttachments.getChildren());
        for (Iterator iterator = columns.iterator(); iterator.hasNext(); ) {
            Column column = (Column) iterator.next();
            if (!column.isRendered())
                iterator.remove();
        }
        if (childComponents.size() > 0 || columns.size() == 0)
            columns.add(new Column());

        return columns;
    }
View Full Code Here


    public List<BaseColumn> getAllColumns() {
        FacesContext context = FacesContext.getCurrentInstance();
        List<BaseColumn> columns = TableUtil.getColumnsFromList(context, fileAttachments.getChildren());

        if (childComponents.size() > 0 || columns.size() == 0)
            columns.add(new Column());

        return columns;
    }
View Full Code Here

    }

    @Override
    public void setComponentProperties(FacesContext context, UIComponent component) {
        super.setComponentProperties(context, component);
        Column column = ((Column) component);
        setValueExpressionProperty(component, "value");
        setValueExpressionProperty(component, "sortingExpression");
        setValueExpressionProperty(component, "groupingExpression");
        setConverterProperty(component, "converter");
        setConverterProperty(component, "groupingValueConverter");

        String sortingComparator = getPropertyValue("sortingComparator");
        if (sortingComparator != null) {
            ValueExpression comparatorExpression;
            if (!isValueReference(sortingComparator)) {
                if (CASE_INSENSITIVE_TEXT_COMPARATOR.equals(sortingComparator))
                    comparatorExpression = new CaseInsensitiveComparatorBinding();
                else
                    throw new IllegalArgumentException("sortingComparator attribute should either be defined as binding or as \"" + CASE_INSENSITIVE_TEXT_COMPARATOR + "\", but it is defined as follows: " + sortingComparator);
            } else {
                comparatorExpression = createValueExpression(context, "sortingComparator", sortingComparator);
            }
            column.setSortingComparatorExpression(comparatorExpression);
        }

        setClassProperty(component, "type");
    }
View Full Code Here

        return true;
    }

    @Override
    public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
        Column column = (Column) component;
        Cell customCell = (Cell) column.getAttributes().get(ATTR_CUSTOM_CELL);

        UIComponent cellContentsContainer = customCell != null ? customCell : column;

        Runnable exitContext =  (cellContentsContainer instanceof ContextDependentComponent)
                ? ((ContextDependentComponent) cellContentsContainer).enterComponentContext() : null;
View Full Code Here

        ));
        elementProperties.setStyle("width: 100%; height: 100%;");
        elementProperties.getChildren().add(new Scrolling());
        elementProperties.getChildren().add(new ColumnResizing());
        elementProperties.setVerticalGridLines("1px solid gray");
        Column col1 = new Column();
        col1.setStyle("width: 150px");
        col1.setHeader(Components.createOutputText(context, "Property"));
        elementProperties.getChildren().add(col1);
        Column col2 = new Column();
        col2.setHeader(Components.createOutputText(context, "Value"));
        elementProperties.getChildren().add(col2);
    }
View Full Code Here

        if (Environment.isExplorer())
            logTable.setStyle("width: 100%");
        else
            logTable.setStyle("width: 100%; height: 100%;");
        logTable.setVerticalGridLines("1px solid gray");
        Column col1 = new Column();
        col1.setStyle("width: 150px");
        col1.setHeader(Components.createOutputText(context, "Time"));
        logTable.getChildren().add(col1);
        Column col2 = new Column();
        col2.setHeader(Components.createOutputText(context, "Message"));
        logTable.getChildren().add(col2);

        return panelGrid;
    }
View Full Code Here

    public List<BaseColumn> getRenderedColumns() {
        FacesContext context = FacesContext.getCurrentInstance();
        List<BaseColumn> columns = TableUtil.getColumnsFromList(context, dropDownField.getChildren());
        for (Iterator iterator = columns.iterator(); iterator.hasNext(); ) {
            Column column = (Column) iterator.next();
            if (!column.isRendered())
                iterator.remove();
        }
        if (childComponents.size() > 0 || columns.size() == 0)
            columns.add(new Column());

        return columns;
    }
View Full Code Here

    public List<BaseColumn> getAllColumns() {
        FacesContext context = FacesContext.getCurrentInstance();
        List<BaseColumn> columns = TableUtil.getColumnsFromList(context, dropDownField.getChildren());

        if (childComponents.size() > 0 || columns.size() == 0)
            columns.add(new Column());

        return columns;
    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.table.Column

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.