Examples of HtmlSimpleColumn


Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

        if (uiData instanceof HtmlDataTable) {
            List children = getChildren(uiData);
            for (int j = 0, size = getChildCount(uiData); j < size; j++) {
                UIComponent child = (UIComponent) children.get(j);
                if (child instanceof HtmlSimpleColumn) {
                    HtmlSimpleColumn column = (HtmlSimpleColumn) child;
                    if (column.isGroupBy()) {
                        return true;
                    }
                }
            }
        }
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

        int currentRowInfoIndex = -1;

        TableContext tableContext = htmlDataTable.getTableContext();
        RowInfo rowInfo = null;
        ColumnInfo columnInfo = null;
        HtmlSimpleColumn currentColumn = null;
        Map groupHashTable = new HashMap();

        if (rows <= 0) {
            last = htmlDataTable.getRowCount();
        }
        else {
            last = first + rows;
        }

        //Loop over the Children Columns to find the Columns with groupBy Attribute true
        List children = getChildren(htmlDataTable);
        int nChildren = getChildCount(htmlDataTable);

        for (int j = 0, size = nChildren; j < size; j++) {
            UIComponent child = (UIComponent) children.get(j);
            if (child instanceof HtmlSimpleColumn) {
                currentColumn = (HtmlSimpleColumn) child;
                if (currentColumn.isGroupBy()) {
                    groupHashTable.put(new Integer(j), null);
                }
            }
        }

        boolean groupEndReached = false;

        for (int rowIndex = first; last == -1 || rowIndex < last; rowIndex++) {
            htmlDataTable.setRowIndex(rowIndex);
            rowInfo = new RowInfo();
            //scrolled past the last row
            if (!htmlDataTable.isRowAvailable()) {
                break;
            }

            Set groupIndexList = groupHashTable.keySet();
            List currentColumnContent = null;
            for (Iterator it = groupIndexList.iterator(); it.hasNext();) {
                currentColumnContent = new ArrayList();
                Integer currentIndex = (Integer) it.next();
                currentColumn = (HtmlSimpleColumn) children.get(currentIndex.intValue());

                if (currentColumn.isGroupByValueSet()) {
                    currentColumnContent.add(currentColumn.getGroupByValue());
                }
                else {
                    // iterate the children - this avoids to add the column facet too
                    List currentColumnChildren = currentColumn.getChildren();
                    if (currentColumnChildren != null) {
                        collectChildrenValues(currentColumnContent, currentColumnChildren.iterator());
                    }
                }
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

        if (uiData instanceof HtmlDataTable) {
            List children = getChildren(uiData);
            for (int j = 0, size = getChildCount(uiData); j < size; j++) {
                UIComponent child = (UIComponent) children.get(j);
                if (child instanceof HtmlSimpleColumn) {
                    HtmlSimpleColumn column = (HtmlSimpleColumn) child;
                    if (column.isGroupBy()) {
                        return true;
                    }
                }
            }
        }
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

        int currentRowInfoIndex = -1;

        TableContext tableContext = htmlDataTable.getTableContext();
        RowInfo rowInfo = null;
        ColumnInfo columnInfo = null;
        HtmlSimpleColumn currentColumn = null;
        Map groupHashTable = new HashMap();

        if (rows <= 0) {
            last = htmlDataTable.getRowCount();
        }
        else {
            last = first + rows;
        }

        //Loop over the Children Columns to find the Columns with groupBy Attribute true
        List children = getChildren(htmlDataTable);
        int nChildren = getChildCount(htmlDataTable);

        for (int j = 0, size = nChildren; j < size; j++) {
            UIComponent child = (UIComponent) children.get(j);
            if (child instanceof HtmlSimpleColumn) {
                currentColumn = (HtmlSimpleColumn) child;
                if (currentColumn.isGroupBy()) {
                    groupHashTable.put(new Integer(j), null);
                }
            }
        }

        boolean groupEndReached = false;

        for (int rowIndex = first; last == -1 || rowIndex < last; rowIndex++) {
            htmlDataTable.setRowIndex(rowIndex);
            rowInfo = new RowInfo();
            //scrolled past the last row
            if (!htmlDataTable.isRowAvailable()) {
                break;
            }

            Set groupIndexList = groupHashTable.keySet();
            List currentColumnContent = null;
            for (Iterator it = groupIndexList.iterator(); it.hasNext();) {
                currentColumnContent = new ArrayList();
                Integer currentIndex = (Integer) it.next();
                currentColumn = (HtmlSimpleColumn) children.get(currentIndex.intValue());

                if (currentColumn.isGroupByValueSet()) {
                    currentColumnContent.add(currentColumn.getGroupByValue());
                }
                else {
                    // iterate the children - this avoids to add the column facet too
                    List currentColumnChildren = currentColumn.getChildren();
                    if (currentColumnChildren != null) {
                        collectChildrenValues(currentColumnContent, currentColumnChildren.iterator());
                    }
                }
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

                String propertyName = null;
                boolean defaultSorted = false;

                if (aColumn instanceof HtmlSimpleColumn)
                {
                    HtmlSimpleColumn asColumn = (HtmlSimpleColumn) aColumn;
                    propertyName = asColumn.getSortPropertyName();
                    defaultSorted = asColumn.isDefaultSorted();

                    if (asColumn.isSortable())
                        replaceHeaderFacets = true;
                }

                //replace header facet with a sortable header component if needed
                if (replaceHeaderFacets && isSortHeaderNeeded(aColumn, headerFacet))
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

            for (Iterator iter = getChildren().iterator(); iter.hasNext();)
            {
                UIComponent component = (UIComponent) iter.next();
                if (component instanceof HtmlSimpleColumn)
                {
                    HtmlSimpleColumn aColumn = (HtmlSimpleColumn) component;
                    if (isSortable())
                        aColumn.setSortable(true);

                    if (aColumn.isSortable())
                        isSortable = true;

                    if (aColumn.isDefaultSorted() && getSortColumn() == null)
                        setSortProperty(aColumn.getSortPropertyName());
                }
            }

            if (isSortable)
                dataModel = new SortableModel(dataModel);
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

                String propertyName = null;
                boolean defaultSorted = false;

                if (aColumn instanceof HtmlSimpleColumn)
                {
                    HtmlSimpleColumn asColumn = (HtmlSimpleColumn) aColumn;
                    propertyName = asColumn.getSortPropertyName();
                    defaultSorted = asColumn.isDefaultSorted();

                    if (asColumn.isSortable())
                        replaceHeaderFacets = true;
                }

                //replace header facet with a sortable header component if needed
                if (replaceHeaderFacets && isSortHeaderNeeded(aColumn, headerFacet))
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

            for (Iterator iter = getChildren().iterator(); iter.hasNext();)
            {
                UIComponent component = (UIComponent) iter.next();
                if (component instanceof HtmlSimpleColumn)
                {
                    HtmlSimpleColumn aColumn = (HtmlSimpleColumn) component;
                    if (isSortable())
                        aColumn.setSortable(true);

                    if (aColumn.isSortable())
                        isSortable = true;

                    if (aColumn.isDefaultSorted() && getSortColumn() == null)
                        setSortProperty(aColumn.getSortPropertyName());
                }
            }

            if (isSortable)
                dataModel = new SortableModel(dataModel);
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

            for (int j = 0, size = getChildCount(uiData); j < size; j++)
            {
                UIComponent child = (UIComponent) children.get(j);
                if(child instanceof HtmlSimpleColumn)
                {
                    HtmlSimpleColumn column = (HtmlSimpleColumn) child;
                    if(column.isGroupBy())return true;
                }
            }
        }

        return false//To change body of created methods use File | Settings | File Templates.
View Full Code Here

Examples of org.apache.myfaces.custom.column.HtmlSimpleColumn

        int currentRowInfoIndex=-1;

        TableContext tableContext=htmlDataTable.getTableContext();
        RowInfo rowInfo=null;
        ColumnInfo columnInfo=null;
        HtmlSimpleColumn currentColumn=null;
        Map groupHashTable = new HashMap();

        if (rows <= 0)
        {
            last = htmlDataTable.getRowCount();
        }
        else
        {
            last = first + rows;
        }


        //Loop over the Children Columns to find the Columns with groupBy Attribute true
        List children = getChildren(htmlDataTable);
        int nChildren = getChildCount(htmlDataTable);

        for (int j = 0, size = nChildren; j < size; j++)
        {
            UIComponent child = (UIComponent) children.get(j);
            if(child instanceof HtmlSimpleColumn)
            {
                currentColumn = (HtmlSimpleColumn) child;
                if(currentColumn.isGroupBy())
                {
                    groupHashTable.put(new Integer(j),"");
                }
            }
        }

        boolean groupEndReached = false;

        for (int rowIndex = first; last==-1 || rowIndex < last; rowIndex++)
        {
            htmlDataTable.setRowIndex(rowIndex);
            rowInfo = new RowInfo();
            //scrolled past the last row
            if (!htmlDataTable.isRowAvailable())
                break;

            Set groupIndexList = groupHashTable.keySet();
            StringBuffer currentColumnContent = null;
            for(Iterator it = groupIndexList.iterator(); it.hasNext(); )
            {
                currentColumnContent = new StringBuffer();
                Integer currentIndex=(Integer) it.next();
                currentColumn = (HtmlSimpleColumn) children.get(currentIndex.intValue());
                List currentColumnChildren = currentColumn.getChildren();
                for (int j = 0, size = currentColumnChildren.size(); j < size; j++)
                {
                    UIComponent currentColumnChild = (UIComponent) currentColumnChildren.get(j);
                    if (currentColumnChild.isRendered() && currentColumnChild instanceof ValueHolder)
                    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.