Package org.openfaces.component.table

Examples of org.openfaces.component.table.TreeTable


    }

    @Override
    public void setComponentProperties(FacesContext facesContext, UIComponent component) {
        super.setComponentProperties(facesContext, component);
        TreeTable treeTable = ((TreeTable) component);

        setStringProperty(component, "nodeLevelVar");
        setStringProperty(component, "nodePathVar");
        setStringProperty(component, "nodeHasChildrenVar");
        setIntProperty(component, "sortLevel");
View Full Code Here


    private static final String HIDDEN_ROW_CLASS = "o_hiddenRow";

    @Override
    protected String[][] getBodyRowAttributes(FacesContext context, AbstractTable table) throws IOException {
        super.getBodyRowAttributes(context, table);
        TreeTable treeTable = (TreeTable) table;
        boolean nodeVisible = treeTable.isNodeInitiallyVisible();
        if (!nodeVisible) {
            return new String[][]{
                    new String[]{"class", HIDDEN_ROW_CLASS}
            };
        }
View Full Code Here

        return null;
    }

    @Override
    protected String getAdditionalRowClass(FacesContext context, AbstractTable table, Object rowData, int rowIndex) {
        TreeTable treeTable = (TreeTable) table;
        if (!treeTable.isFilteringPerformed())
            return null;
        boolean nodeAcceptedByFilters = treeTable.isNodeAcceptedByFilters();
        String result = nodeAcceptedByFilters
                ? getFilterAcceptedRowClass(context, treeTable)
                : getFilterSubsidiaryRowClass(context, treeTable);
        return result;
    }
View Full Code Here

            FacesContext context,
            AbstractTable table,
            ScriptBuilder buf) throws IOException {
        super.encodeAdditionalFeaturesSupport_buf(context, table, buf);

        TreeTable treeTable = (TreeTable) table;
        boolean foldingEnabled = treeTable.isFoldingEnabled();
        if (foldingEnabled) {
            encodeFoldingSupport(context, buf, treeTable);
        }

        getFilterAcceptedRowClass(context, treeTable);
View Full Code Here

    ) throws IOException {
        if (!portionName.startsWith(SUB_ROWS_PORTION))
            return super.encodeAjaxPortion(context, component, portionName, jsonParam);
        String portionNameSuffix = portionName.substring(SUB_ROWS_PORTION.length());
        int rowIndex = Integer.parseInt(portionNameSuffix);
        TreeTable treeTable = (TreeTable) component;
        boolean rowAvailableAfterRestoring = treeTable.isRowAvailableAfterRestoring(rowIndex);
        if (rowAvailableAfterRestoring) {
            treeTable.setRowIndex(rowIndex);
            TreePath nodeKeyPath = treeTable.getNodeKeyPath();
            treeTable.setNodeExpanded(nodeKeyPath, true);
        }
        int addedRowCount = rowAvailableAfterRestoring ? treeTable.loadSubNodes(rowIndex) : 0;

        Map<Integer, CustomRowRenderingInfo> customRowRenderingInfos = (Map<Integer, CustomRowRenderingInfo>)
                treeTable.getAttributes().get(TableStructure.CUSTOM_ROW_RENDERING_INFOS_KEY);
        for (int i = treeTable.getRowCount(); i > rowIndex; i--) {
            CustomRowRenderingInfo rowInfo = customRowRenderingInfos.remove(i);
            if (rowInfo == null)
                continue;
            customRowRenderingInfos.put(i + addedRowCount, rowInfo);
        }
View Full Code Here

TOP

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

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.