Enum FieldFilterMode

java.lang.Object
java.lang.Enum<FieldFilterMode>
com.smartgwt.client.types.FieldFilterMode
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<FieldFilterMode>, Constable

public enum FieldFilterMode extends Enum<FieldFilterMode> implements ValueEnum
Indicates where a given field can be legally filtered. By default, any field where DataSourceField.canFilter isn't false allows filtering either at the server or at the client, according to related settings.

This is the recommended behavior, but it can be useful or necessary to limit filtering in some cases.

  • Enum Constant Details

    • BOTH

      public static final FieldFilterMode BOTH
      - filter on the client where possible and contact the server when necessary

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "both".

    • SERVERONLY

      public static final FieldFilterMode SERVERONLY
      - any change to criteria for a field causes cache invalidation and a trip to the server. This mode is quite useful for cases where client filtering can't replicate server filtering, such as:
      • search engines that consider something a match based on word roots (like treating "sunken" as a match for "sink")
      • server-side formatting, where values are delivered as HTML or even as images, where the value seen in the browser no longer matches the search text
      • searching large files where the files won't be delivered to the client
      By using this mode only for fields that are special, you can preserve the performance benefits of client-side filtering on other fields.

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "serverOnly".

  • Method Details

    • values

      public static FieldFilterMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static FieldFilterMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Specified by:
      getValue in interface ValueEnum