Package org.openfaces.component

Examples of org.openfaces.component.TableStyles


        return columnHierarchyLevels;
    }

    private HeaderRow composeCommonHeaderRow(TableStructure tableStructure, String cellTag) {
        List columns = tableStructure.getColumns();
        TableStyles table = tableStructure.getTableStyles();
        UIComponent headerOrFooter = isHeader ? table.getHeader() : table.getFooter();
        if (headerOrFooter == null)
            return null;
        HeaderCell cell = new HeaderCell(null, headerOrFooter, cellTag, null);

        int colSpan;
View Full Code Here


    }

    @Override
    protected void fillInitParam(JSONObject initObject, TableStyles defaultStyles) throws JSONException {
        TableStructure tableStructure = getParent(TableStructure.class);
        TableStyles tableStyles = tableStructure.getTableStyles();
        FacesContext context = FacesContext.getCurrentInstance();
        UIComponent component = tableStructure.getComponent();
        String sectionClass = Styles.getCSSClass(context, component,
                isHeader ? tableStyles.getHeaderSectionStyle() : tableStyles.getFooterSectionStyle(),
                isHeader ? tableStyles.getHeaderSectionClass() : tableStyles.getFooterSectionClass());
        sectionClass = TableUtil.getClassWithDefaultStyleClass(
                tableStyles.getApplyDefaultStyle(),
                isHeader ? TableUtil.DEFAULT_HEADER_SECTION_CLASS : TableUtil.DEFAULT_FOOTER_SECTION_CLASS,
                sectionClass);

        if (!Rendering.isNullOrEmpty(sectionClass))
            initObject.put("className", sectionClass);
        if (tableStructure.getScrolling() != null)
            initObject.put("rowCount", allRows.size());
        if (commonHeaderRow != null)
            initObject.put("commonHeader", getCommonHeaderParam(tableStructure));
        if (hasSubHeader)
            initObject.put("subHeader", getSubHeaderParam(tableStructure));

        String headerClassName = Styles.getCSSClass(context, component,
                isHeader ? tableStyles.getHeaderRowStyle() : tableStyles.getFooterRowStyle(),
                isHeader ? tableStyles.getHeaderRowClass() : tableStyles.getFooterRowClass());
        if (!Rendering.isNullOrEmpty(headerClassName))
            initObject.put("headingsClassName", headerClassName);
    }
View Full Code Here

    private void encodeInitialization(
            FacesContext context,
            AbstractTable table,
            ScriptBuilder buf) throws IOException {
        TableStyles defaultStyles = TableStructure.getDefaultStyles(table);
        TableStructure tableStructure = TableStructure.getCurrentInstance(table);

        buf.initScript(context, table, "O$.Table._init",
                tableStructure.getInitParam(context, defaultStyles),
                table.getUseAjax(),
View Full Code Here

        UIComponent styleOwnerComponent = getComponent();
        boolean forceUsingCellStyles = getForceUsingCellStyles(styleOwnerComponent);

        List<BaseColumn> visibleColumns = getColumns();
        List<BaseColumn> allColumns = getAllColumns();
        TableStyles tableStyles = getTableStyles();
        Map<Object, String> rowStylesMap = getRowStylesMap();
        Map<Object, String> cellStylesMap = getCellStylesMap();

        JSONObject result = new JSONObject();
        Rendering.addJsonParam(result, "header", getHeader().getInitParam(defaultStyles));
View Full Code Here

        super(tableStructure);
        this.tableStructure = tableStructure;
    }

    protected void fillInitParam(JSONObject result, TableStyles defaultStyles) throws JSONException {
        TableStyles table = tableStructure.getTableStyles();
        FacesContext context = FacesContext.getCurrentInstance();
        UIComponent component = tableStructure.getComponent();
        String bodyClass = Styles.getCSSClass(context,
                component, table.getBodySectionStyle(), table.getBodySectionClass());
        result.put("className", bodyClass);
        Rendering.addJsonParam(result, "rowClassName", Styles.getCSSClass(context, component, table.getBodyRowStyle(),
                StyleGroup.regularStyleGroup(), table.getBodyRowClass(),
                defaultStyles != null ? defaultStyles.getBodyRowClass() : null));
        Rendering.addJsonParam(result, "oddRowClassName", Styles.getCSSClass(context, component, table.getBodyOddRowStyle(),
                getBodyOddRowClass(table, defaultStyles)));
        if (table instanceof AbstractTable) {
            AbstractTable at = (AbstractTable) table;
            Rendering.addJsonParam(result, "rolloverRowClassName", Styles.getCSSClass(context, component,
                    at.getRolloverRowStyle(), StyleGroup.rolloverStyleGroup(), at.getRolloverRowClass()));
View Full Code Here

TOP

Related Classes of org.openfaces.component.TableStyles

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.