Class SelectInputField


  • @JsonData
    public class SelectInputField
    extends Field
    A field that allows to choose from a list of predefined values.
    Since:
    taskplanner 3.0
    • Constructor Detail

      • SelectInputField

        public SelectInputField​(java.lang.String key,
                                java.lang.String label,
                                int typeID)
        Creates the field for selecting a value from a predefined list
        Parameters:
        key - the key of the field
        label - the label to be displayed in front of the field
        typeID - type ID, known to implementors and callers of TaskFieldListGenerator
        Since:
        taskplanner 3.0
    • Method Detail

      • setValue

        public void setValue​(java.lang.String value)
        Sets the current value of the field
        Overrides:
        setValue in class Field
        Parameters:
        value - the current value of the field
      • setDisplay

        public void setDisplay​(java.lang.String value)
        manually sets the display value this field should have
        Parameters:
        value - the display value this field should have
        Since:
        taskplanner 5.0
      • setAllowCustomValues

        public void setAllowCustomValues​(boolean customValues)
        Sets whether custom values are allowed to be entered
        Parameters:
        customValues - whether custom values are allowed to be entered
        Since:
        taskplanner 22.4
      • patchSeriesPlaceholderInValue

        public java.lang.String patchSeriesPlaceholderInValue​(java.lang.String value,
                                                              java.util.Map<java.lang.String,​java.lang.String> seriesProperties)
        Override to replace the placeholders with the values from the series
        Overrides:
        patchSeriesPlaceholderInValue in class Field
        Parameters:
        value - the value to be patched
        seriesProperties - properties from the current series set
        Returns:
        the new value with replaced placeholders
      • patchResultPlaceholderInValue

        public java.lang.String patchResultPlaceholderInValue​(java.lang.String value,
                                                              java.util.List<JobResultContainer> results)
        Override to replace the placeholders with the values from the results
        Overrides:
        patchResultPlaceholderInValue in class Field
        Parameters:
        value - the value to be patched
        results - the results that contain the meta properties that are replaced
        Returns:
        the new value with replaced placeholders