Enum DefaultXItemFieldNameConventions

    • Method Detail

      • values

        public static DefaultXItemFieldNameConventions[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DefaultXItemFieldNameConventions c : DefaultXItemFieldNameConventions.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DefaultXItemFieldNameConventions 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
      • findRelatedBaseNames

        public Set<String> findRelatedBaseNames​(String baseName)
        Description copied from interface: IXItemFieldNameConventions
        Given the base name of a form item, returns the set of additional related names that might be submitted.

        For example, when the form contains an autocomplete element with the name sel1, the form submission might include a value for the related name sel1_autocomplete in addition to the value for the name sel1. This method should then return a set with the one value sel1_autocomplete when called with the base name sel1.

        This is the inverse operation of resolveRelatedBaseName. If this method is given a string X and returns a set of strings Y, then resolveRelatedBaseName must return X if given any of the strings Y.

        This method is never given a derived name for repeated form fields. Repeated form fields use the convention tf1_dyn_fs1_0 (item base name tf1, container base name fs1, repetition ID 0).

        Specified by:
        findRelatedBaseNames in interface IXItemFieldNameConventions
        Parameters:
        baseName - The base name of an item.
        Returns:
        A set of related base names. null or the empty set when there are no related base name.
      • resolveRelatedBaseName

        public String resolveRelatedBaseName​(String relatedBaseName)
        Description copied from interface: IXItemFieldNameConventions
        Given the base name of a request value, finds the base name of the form item that produced this request value.

        For example, when the form contains an autocomplete element with the name sel1, the form submission might include a value for the related name sel1_autocomplete in addition to the value for the name sel1. This method should then return sel1 when given the name sel1_autocomplete.

        This method is never given a derived name for repeated form fields. Repeated form fields use the convention tf1_dyn_fs1_0 (item base name tf1, container base name fs1, repetition ID 0).

        This is the inverse operation of findRelatedBaseNames. If findRelatedBaseNames is given a string X and returns a set of strings Y , then this method must return . X if given any of the strings Y.

        Specified by:
        resolveRelatedBaseName in interface IXItemFieldNameConventions
        Parameters:
        relatedBaseName - A related base name to resolve.
        Returns:
        The resolved base name. null, the empty string, or the argument itself when the name is unknown to this conventions instance.