Package org.primefaces.model

Examples of org.primefaces.model.FilterMeta


                                    if(filterFacet == null)
                                        filterValue = params.get(column.getClientId(context) + separator + "filter");
                                    else
                                        filterValue = ((ValueHolder) filterFacet).getLocalValue();

                                    filterMetadata.add(new FilterMeta(column, filterByVE, filterValue));
                                }
                            }
                        }
                        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
                        filterValue = ((ValueHolder) filterFacet).getLocalValue();

                    filterMetadata.add(new FilterMeta(column, filterByVE, filterValue));
                }
            }
        }

      return filterMetadata;
View Full Code Here


                                if(filterFacet == null)
                                    filterValue = params.get(column.getClientId(context) + separator + "filter");
                                else
                                    filterValue = ((ValueHolder) filterFacet).getLocalValue();

                                filterMetadata.add(new FilterMeta(column, filterByVE, filterValue));
                            }
                        }
                    }
                }
            }
        }
        else {
            for(UIColumn column : table.getColumns()) {
                ValueExpression columnFilterByVE = column.getValueExpression("filterBy");
                Object filterByProperty = column.getFilterBy();
               
                if (columnFilterByVE != null || filterByProperty != null) {
                    UIComponent filterFacet = column.getFacet("filter");
                    Object filterValue = null;
                    ValueExpression filterByVE = null;
                    String filterId = null;
                   
                    if(column instanceof Column) {
                        filterByVE = (columnFilterByVE != null) ? columnFilterByVE : createFilterByVE(context, var, filterByProperty);
                        filterId = column.getClientId(context) + separator + "filter";
                    }
                    else if(column instanceof DynamicColumn) {
                        DynamicColumn dynamicColumn = (DynamicColumn) column;
                        dynamicColumn.applyStatelessModel();
                        filterByProperty = column.getFilterBy();
                        filterByVE = (filterByProperty == null) ? columnFilterByVE : createFilterByVE(context, var, filterByProperty);
                        filterId = dynamicColumn.getContainerClientId(context) + separator + "filter";
                        dynamicColumn.cleanStatelessModel();
                    }
                   
                    if(filterFacet == null)
                        filterValue = params.get(filterId);
                    else
                        filterValue = ((ValueHolder) filterFacet).getLocalValue();

                    filterMetadata.add(new FilterMeta(column, filterByVE, filterValue));
                }
            }
        }

      return filterMetadata;
View Full Code Here

TOP

Related Classes of org.primefaces.model.FilterMeta

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.