Package org.openfaces.component.table

Examples of org.openfaces.component.table.ColumnResizingState


            UIComponent component,
            List<BaseColumn> columns) throws IOException {

        ColumnResizing columnResizing = (component instanceof AbstractTable) ?
                ((AbstractTable) component).getColumnResizing() : null;
        ColumnResizingState columnResizingState = columnResizing != null ? columnResizing.getResizingState() : null;
        ResponseWriter writer = context.getResponseWriter();
        for (BaseColumn column : columns) {
            String colWidth = columnResizingState != null ? columnResizingState.getColumnWidth(column.getId()) : null;
            if (colWidth == null)
                colWidth = column.getWidth();
            String align = column.getAlign();
            String valign = column.getValign();
            writeColTag(component, writer, colWidth, align, valign);
View Full Code Here


        List<BaseColumn> columns = table.getRenderedColumns();
        if (columns.size() != widthsArray.length())
            throw new IllegalStateException("columns.size() != widthsArray.length(): " + columns.size() + " != " + widthsArray.length());

        ColumnResizing columnResizing = (ColumnResizing) component;
        ColumnResizingState resizingState = columnResizing.getResizingState();
        if (resizingState == null)
            resizingState = new ColumnResizingState();

        resizingState.setTableWidth(tableWidth);

        for (int i = 0, count = columns.size(); i < count; i++) {
            BaseColumn column = columns.get(i);
            String newWidth;
            try {
                newWidth = widthsArray.getString(i);
            } catch (JSONException e) {
                throw new RuntimeException(e);
            }

            resizingState.setColumnWidth(column.getId(), newWidth);
        }

        if (submittedColumnsOrder != null) {
            if (table.getColumnsOrder() != null && ValueBindings.set(table, "columnsOrder", table.getColumnsOrder())) {
                table.setColumnsOrder(null);
View Full Code Here

TOP

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

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.