Class StringControl

    • Constructor Detail

      • StringControl

        protected StringControl​(String type,
                                IValueAccessor<?> root,
                                String path,
                                IStringValueDescriptor descriptor,
                                boolean allowNull)
        Creates a new string control.
        Parameters:
        type - The type of the control that determines how it is rendered.
        root - The root object against which the path is evaluated.
        path - The JSON path expression that references the value.
        descriptor - The descriptor that describes the string value being edited.
        allowNull - Whether null values are allowed.
    • Method Detail

      • getMaxLength

        public int getMaxLength()
        Gets the maximum allowed length of the string. This value is read from the given value descriptor.
        Returns:
        The maximum allowed length of the string, or Integer.MAX_VALUE if no maximum is specified.
      • getMinLength

        public int getMinLength()
        Gets the minimum required length of the string. This value is read from the given value descriptor.
        Returns:
        The minimum required length of the string, or 0 if no minimum is specified.