Package org.openfaces.component.table

Examples of org.openfaces.component.table.AbstractTableSelection


        AbstractTable table = getTable((BaseColumn) component);
        if (table == null) {
            throw new IllegalStateException("SelectionColumn must be nested inside a DataTable/TreeTable component");
        }
        AbstractTableSelection selection = table.getSelection();
        if (selection == null) {
            throw new IllegalStateException("<o:selectionColumn> must be inserted into a DataTable/TreeTable with selection enabled. table id: " + table.getClientId(context));
        }
        AbstractTableSelection.Mode selectionMode = selection.getSelectionMode();
        boolean rowSelection = true; // selection instanceof RowSelection
        /*if (!rowSelection)
            throw new IllegalStateException("<o:selectionColumn> can only be inserted into a DataTable/TreeTable with row selection. table id: " + table.getClientId(context));
        */
        ResponseWriter writer = context.getResponseWriter();
View Full Code Here


                AbstractTable table = Components.getParentWithClass(column, AbstractTable.class);
                if (table == null)
                    throw new FacesException("<o:selectRowCheckbox> can only be used in columns of table components " +
                            "(<o:dataTable> or <o:treeTable)");

                AbstractTableSelection selection = table.getSelection();
                if (selection == null)
                    throw new IllegalStateException("<o:selectRowCheckbox> can only be used in a DataTable or " +
                            "TreeTable with multiple selection. clientId = " + selectRowCheckbox.getClientId(context));
                boolean multipleRowSelection = selection.isMultipleSelectionAllowed();
                if (!multipleRowSelection)
                    throw new IllegalStateException("<o:selectRowCheckbox> can only be inserted into a DataTable or " +
                            "TreeTable with multiple selection, but single selection is used here. clientId = " + selectRowCheckbox.getClientId(context));

                selectRowCheckbox.setTriStateAllowed(table instanceof TreeTable);
View Full Code Here

        AbstractTable table = getTable(component);
        if (table == null)
            throw new IllegalStateException("SelectionColumn must be nested inside a table");
        BaseColumn col = getColumn(component);
        boolean checkBoxColHeader = col instanceof CheckboxColumn;
        AbstractTableSelection selection;
        if (!checkBoxColHeader) {
            selection = table.getSelection();
            if (selection == null)
                throw new IllegalStateException("<o:selectAllCheckbox> can only be inserted into a DataTable or TreeTable with multiple selection. clientId = " + component.getClientId(context));
            boolean multipleRowSelection = selection.isMultipleSelectionAllowed();
            if (!multipleRowSelection)
                throw new IllegalStateException("<o:selectAllCheckbox> can only be inserted into a DataTable or TreeTable with multiple selection. clientId = " + component.getClientId(context));
        } else
            selection = null;

        SelectAllCheckbox selectAllCheckbox = (SelectAllCheckbox) component;
        if (!checkBoxColHeader) {
            if (!selection.isEnabled()) {
                selectAllCheckbox.setDisabled(true);
            }
        }

        selectAllCheckbox.setSelected(false);
View Full Code Here

TOP

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

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.