Class SelectorSettings<T extends SelectorSettings<T>>

    • Constructor Detail

      • SelectorSettings

        public SelectorSettings()
    • Method Detail

      • select

        public T select​(boolean enableSearch)
        Set the control as "select".
        Parameters:
        enableSearch - to define if you want to provide search on this select
        Returns:
        a reference to this object - used to chain calls
        See Also:
        SelectorSettings.SelectorType.SELECT
      • enumValues

        public T enumValues​(java.lang.Object[] enumValues)
        Set the array of values to use for this settings.
        Parameters:
        enumValues - Array of values to use
        Returns:
        a reference to this object - used to chain calls
      • enumValues

        public T enumValues​(java.util.Collection<?> enumValues)
        Set the collection of values to use for this settings.
        Parameters:
        enumValues - Collection of values to use
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumValues(Object[])
      • enumValues

        public T enumValues​(java.lang.Object enumValue,
                            java.lang.Object... otherEnumValues)
        Set the values to use for this settings.
        Parameters:
        enumValue - the first value
        otherEnumValues - The other values
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumValues(Object[])
      • enumDataAttribute

        public T enumDataAttribute​(java.util.List<DataAttribute> dataAttributes)
      • enumLabelPreprends

        public T enumLabelPreprends​(java.lang.String[] enumLabelPrepends)
        Specify the text to prepend to labels in this settings.

        HTML may be specified and will be printed exactly as received.

        Parameters:
        enumLabelPrepends - the prepend strings to use.
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumLabels(String[]), enumLabelAppends(String[])
      • enumLabelPreprends

        public T enumLabelPreprends​(java.util.Collection<java.lang.String> enumLabelPrepends)
        Specify the text to prepend to labels in this settings.

        HTML may be specified and will be printed exactly as received.

        Parameters:
        enumLabelPrepends - the prepend strings to use.
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumLabels(Collection), enumLabelAppends(Collection)
      • enumLabelPreprends

        public T enumLabelPreprends​(java.lang.String enumLabelPrepend,
                                    java.lang.String... otherEnumLabelPrepends)
        Specify the text to prepend to labels in this settings.

        HTML may be specified and will be printed exactly as received.

        Parameters:
        enumLabelPrepend - the first prepend string to use.
        otherEnumLabelPrepends - the other prepend strings to use.
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumLabels(String, String...), enumLabelAppends(String, String...)
      • enumLabelAppends

        public T enumLabelAppends​(java.lang.String[] enumLabelAppends)
        Specify the text to append to labels in this settings.

        HTML may be specified and will be printed exactly as received.

        Parameters:
        enumLabelAppends - the append strings to use.
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumLabelPreprends(String[]), enumLabels(String[])
      • enumLabelAppends

        public T enumLabelAppends​(java.util.Collection<java.lang.String> enumLabelAppends)
        Specify the text to append to labels in this settings.

        HTML may be specified and will be printed exactly as received.

        Parameters:
        enumLabelAppends - the append strings to use.
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumLabelPreprends(Collection), enumLabels(Collection)
      • enumLabelAppends

        public T enumLabelAppends​(java.lang.String enumLabelAppend,
                                  java.lang.String... otherEnumLabelAppends)
        Specify the text to append to labels in this settings.

        HTML may be specified and will be printed exactly as received.

        Parameters:
        enumLabelAppend - the first append string to use.
        otherEnumLabelAppends - the other append strings to use.
        Returns:
        a reference to this object - used to chain calls
        See Also:
        enumLabelPreprends(String, String...), enumLabels(String, String...)
      • inline

        public T inline()
        Specify whether the enumerated items are displayed in inline mode.
        Returns:
        a reference to this object - used to chain calls
      • disableInline

        public T disableInline()
        Disable the inline mode.
        Returns:
        a reference to this object - used to chain calls
      • multiple

        public T multiple()
        Specify whether multiple items can be selected.

        This methods is only used for the select fields (select()) and chooser fields (chooser()). If this method is used for other selector types (radio(), checkbox()), it will have no effect.

        When the selector is defined as 'chooser' (chooser()), this method allows to have multiple values in the same field :
        Example :

         
         <jalios:field name="myfield" label="Multiple categories in one input" value='<%= Util.join(selectedCategoryIds, " ") %>'>
           <jalios:control settings='<%= new CategorySettings().multiple() %>' />
         </jalios:field>
         
         
        Returns:
        a reference to this object - used to chain calls
        See Also:
        SELECTOR_TYPE, selectorType(SelectorType), radio(), checkbox(), select(), chooser()
      • emptyValueLabel

        public T emptyValueLabel​(java.lang.String label)
        Specify wether the SELECT html tag empty value in case of a non required field.
        Parameters:
        label - to set the label of the first empty value
        Returns:
        a reference to this object - used to chain calls
        Since:
        jcms-10.0.5
      • required

        public T required()
        Specify if the control is required and cannot be empty.
        Returns:
        a reference to this object - used to chain calls