Enum LocatorTypeStrategy

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

public enum LocatorTypeStrategy extends Enum<LocatorTypeStrategy> implements ValueEnum
When attempting to identify a component from within a list of possible candidates as described here, if we are unable to find a unique match by name or title, we will use the recorded "type" of the component to verify an apparent match.

By default we check the following properties in order:

  • Does the Class match?
  • If this is not a framework class, does the core framework superclass match?
  • Does the role match?
In some cases an explicit locatorTypeStrategy can be specified to modify this behavior. As with LocatorStrategy, if we are unable to match using the specified type strategy we continue to test against the remaining strategies in order - so if a type strategy of "scClass" was specified but we were unable to find a match with the appropriate core superclass, we will attempt to match by role. Possible values are:
  • Enum Constant Details

    • CLASS

      public static final LocatorTypeStrategy CLASS
      Match by class if possible

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

    • SCCLASS

      public static final LocatorTypeStrategy SCCLASS
      Ignore specific class and match by the Smart GWT framework superclass.

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

    • ROLE

      public static final LocatorTypeStrategy ROLE
      Ignore class altogether and attempt to match by role

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

    • NONE

      public static final LocatorTypeStrategy NONE
      Don't attempt to compare type in any way

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

  • Method Details

    • values

      public static LocatorTypeStrategy[] 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 LocatorTypeStrategy 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