Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* JBoss, Home of Professional Open Source
* Copyright ${year}, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.richfaces.component;
import java.io.IOException;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import javax.faces.component.UIComponent;
import javax.faces.component.visit.VisitCallback;
import javax.faces.component.visit.VisitContext;
import javax.faces.component.visit.VisitResult;
import javax.faces.context.FacesContext;
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PreRenderComponentEvent;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.ExtendedDataModel;
import org.ajax4jsf.model.Range;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.Facet;
import org.richfaces.context.ExtendedVisitContext;
import org.richfaces.context.ExtendedVisitContextMode;
import org.richfaces.event.FilteringEvent;
import org.richfaces.event.FilteringListener;
import org.richfaces.event.SortingEvent;
import org.richfaces.event.SortingListener;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.model.Arrangeable;
import org.richfaces.model.ArrangeableModel;
import org.richfaces.model.ArrangeableState;
import org.richfaces.model.ArrangeableStateDefaultImpl;
import org.richfaces.model.FilterField;
import org.richfaces.model.SortField;
import org.richfaces.model.SortMode;
import org.richfaces.renderkit.MetaComponentRenderer;
public abstract class UIDataTableBase extends UISequence implements Row, MetaComponentResolver, MetaComponentEncoder {
public static final String COMPONENT_FAMILY = "org.richfaces.Data";
public static final String HEADER_FACET_NAME = "header";
public static final String FOOTER_FACET_NAME = "footer";
public static final String NODATA_FACET_NAME = "noData";
public static final String HEADER = "header";
public static final String FOOTER = "footer";
public static final String BODY = "body";
private static final Logger RENDERKIT_LOG = RichfacesLogger.RENDERKIT.getLogger();
private static final Set SUPPORTED_META_COMPONENTS = new HashSet();
private static Predicate isRow = new Predicate() {
@Override
public boolean apply(@Nullable UIComponent child) {
return child instanceof Row;
}
};
static {
SUPPORTED_META_COMPONENTS.add(HEADER);
SUPPORTED_META_COMPONENTS.add(FOOTER);
SUPPORTED_META_COMPONENTS.add(BODY);
}
protected enum PropertyKeys {
filterVar, sortPriority, sortMode, first, rows, noDataLabel, selection, header
}
/**
* The header of the table
*/
@Facet
public abstract UIComponent getHeader();
/**
* The footer of the table
*/
@Facet
public abstract UIComponent getFooter();
/**
* The content to be displayed when table contains no rows (no data provided).
*/
@Facet
public abstract UIComponent getNoData();
/**
* The label to be displayed when table contains no rows (no data provided).
*/
@Attribute
public abstract String getNoDataLabel();
/**
* Name of the variable used in EL expression provided in filterExpression in order to decide about displaying particular
* row.
*/
@Attribute
public abstract String getFilterVar();
/**
* Assigns one or more space-separated CSS class names to the table cells
*/
@Attribute
public abstract String getRowClass();
/**
* Assigns one or more space-separated CSS class names to the table header
*/
@Attribute
public abstract String getHeaderClass();
/**
* Assigns one or more space-separated CSS class names to the table footer
*/
@Attribute
public abstract String getFooterClass();
/**
* Assigns one or more space-separated CSS class names to the columns of the table. If the CSS class names are
* comma-separated, each class will be assigned to a particular column in the order they follow in the attribute. If you
* have less class names than columns, the class will be applied to every n-fold column where n is the order in which the
* class is listed in the attribute. If there are more class names than columns, the overflow ones are ignored.
*/
@Attribute
public abstract String getColumnClasses();
/**
* Assigns one or more space-separated CSS class names to the rows of the table. If the CSS class names are comma-separated,
* each class will be assigned to a particular row in the order they follow in the attribute. If you have less class names
* than rows, the class will be applied to every n-fold row where n is the order in which the class is listed in the
* attribute. If there are more class names than rows, the overflow ones are ignored.
*/
@Attribute
public abstract String getRowClasses();
@Attribute
public abstract String getStyle();
/**
* Comma-separated list of column names determining priority of row sorting.
*/
@Attribute
public abstract Collection