Package org.primefaces.component.api

Examples of org.primefaces.component.api.DynamicColumn


                                else if(headerRowChild instanceof Columns) {
                                    Columns uiColumns = (Columns) headerRowChild;
                                    String uiColumnsClientId = uiColumns.getClientId(context);

                                    for(int i=0; i < uiColumns.getRowCount(); i++) {
                                        DynamicColumn dynaColumn = new DynamicColumn(i, uiColumns);
                                        dynaColumn.setColumnKey(uiColumnsClientId + separator + i);
                                        dynaColumn.applyModel();
                                       
                                        encodeColumnHeader(context, table, dynaColumn);
                                    }
                                }
                                else {
                                    headerRowChild.encodeAll(context);
                                }
                            }
                        }

                        writer.endElement("tr");
                    }
                    else {
                        child.encodeAll(context);
                    }
                }
            }
           
            context.getAttributes().remove(Constants.HELPER_RENDERER);
        }
        else {
            writer.startElement("tr", null);
            writer.writeAttribute("role", "row", null);
           
            for(int i = columnStart; i < columnEnd; i++) {
                UIColumn column = columns.get(i);

                if(column instanceof Column) {
                    encodeColumnHeader(context, table, column);
                }
                else if(column instanceof DynamicColumn) {
                    DynamicColumn dynamicColumn = (DynamicColumn) column;
                    dynamicColumn.applyModel();

                    encodeColumnHeader(context, table, dynamicColumn);
                }
            }
           
View Full Code Here


                        else if(headerRowChild instanceof Columns) {
                            Columns uiColumns = (Columns) headerRowChild;
                            String uiColumnsClientId = uiColumns.getClientId(context);

                            for(int i=0; i < uiColumns.getRowCount(); i++) {
                                DynamicColumn dynaColumn = new DynamicColumn(i, uiColumns);
                                dynaColumn.setColumnKey(uiColumnsClientId + separator + i);
                                dynaColumn.applyStatelessModel();
                               
                                ValueExpression columnFilterByVE = dynaColumn.getValueExpression("filterBy");
                                if(columnFilterByVE != null) {
                                    Object filterValue = null;
                                    String filterId = dynaColumn.getContainerClientId(context) + separator + "filter";
                                    UIComponent filterFacet = dynaColumn.getFacet("filter");
                                   
                                    if(filterFacet == null)
                                        filterValue = params.get(filterId);
                                    else
                                        filterValue = ((ValueHolder) filterFacet).getLocalValue();
                                   
                                    filterMetadata.add(new FilterMeta(dynaColumn, columnFilterByVE, filterValue));
                                }
                            }
                        }
                    }
                }
            }
        }
        else {
            for(UIColumn column : table.getColumns()) {
                ValueExpression columnFilterByVE = column.getValueExpression("filterBy");
               
                if (columnFilterByVE != null) {
                    UIComponent filterFacet = column.getFacet("filter");                   
                    ValueExpression filterByVE = columnFilterByVE;
                    Object filterValue = null;
                    String filterId = null;
                   
                    if(column instanceof Column) {
                        filterId = column.getClientId(context) + separator + "filter";
                    }
                    else if(column instanceof DynamicColumn) {
                        DynamicColumn dynamicColumn = (DynamicColumn) column;
                        dynamicColumn.applyStatelessModel();
                        filterId = dynamicColumn.getContainerClientId(context) + separator + "filter";
                        dynamicColumn.cleanStatelessModel();
                    }
                   
                    if(filterFacet == null)
                        filterValue = params.get(filterId);
                    else
View Full Code Here

           
            if(column instanceof Column) {
                encodeCell(context, table, column, clientId, selected);
            }
            else if(column instanceof DynamicColumn) {
                DynamicColumn dynamicColumn = (DynamicColumn) column;
                dynamicColumn.applyModel();

                encodeCell(context, table, dynamicColumn, null, false);
            }
        }
View Full Code Here

                if(column instanceof Column) {
                    encodeColumnFooter(context, table, column);
                }
                else if(column instanceof DynamicColumn) {
                    DynamicColumn dynamicColumn = (DynamicColumn) column;
                    dynamicColumn.applyModel();

                    encodeColumnFooter(context, table, dynamicColumn);
                }
            }
           
View Full Code Here

                   
                    if(columnId.startsWith(columnsClientId)) {
                        String[] ids = columnId.split(separator);
                        int index = Integer.parseInt(ids[ids.length - 1]);

                        orderedColumns.add(new DynamicColumn(index, (Columns) child, (columnsClientId + separator + index)));
                        break;
                    }
                   
                }
            }
View Full Code Here

           
            if(column instanceof Column) {
                encodeCell(context, table, column, clientId, false);
            }
            else if(column instanceof DynamicColumn) {
                DynamicColumn dynamicColumn = (DynamicColumn) column;
                dynamicColumn.applyModel();

                encodeCell(context, table, dynamicColumn, null, false);
            }
        }
View Full Code Here

                if(column instanceof Column) {
                    encodeColumnHeader(context, table, column);
                }
                else if(column instanceof DynamicColumn) {
                    DynamicColumn dynamicColumn = (DynamicColumn) column;
                    dynamicColumn.applyModel();

                    encodeColumnHeader(context, table, dynamicColumn);
                }
            }
           
View Full Code Here

                if(column instanceof Column) {
                    encodeColumnHeader(context, table, column);
                }
                else if(column instanceof DynamicColumn) {
                    DynamicColumn dynamicColumn = (DynamicColumn) column;
                    dynamicColumn.applyModel();

                    encodeColumnHeader(context, table, dynamicColumn);
                }
            }
           
View Full Code Here

           
            if(column instanceof Column) {
                encodeCell(context, table, column, clientId, selected);
            }
            else if(column instanceof DynamicColumn) {
                DynamicColumn dynamicColumn = (DynamicColumn) column;
                dynamicColumn.applyModel();

                encodeCell(context, table, dynamicColumn, null, false);
            }
        }
View Full Code Here

                if(column instanceof Column) {
                    encodeColumnFooter(context, table, column);
                }
                else if(column instanceof DynamicColumn) {
                    DynamicColumn dynamicColumn = (DynamicColumn) column;
                    dynamicColumn.applyModel();

                    encodeColumnFooter(context, table, dynamicColumn);
                }
            }
           
View Full Code Here

TOP

Related Classes of org.primefaces.component.api.DynamicColumn

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.