Class SelectInputField
- java.lang.Object
-
- com.inet.taskplanner.server.api.field.Field
-
- com.inet.taskplanner.server.api.field.SelectInputField
-
@JsonData public class SelectInputField extends Field
A field that allows to choose from a list of predefined values.- Since:
- taskplanner 3.0
-
-
Constructor Summary
Constructors Constructor Description SelectInputField(java.lang.String key, java.lang.String label, int typeID)
Creates the field for selecting a value from a predefined list
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
patchResultPlaceholderInValue(java.lang.String value, java.util.List<JobResultContainer> results)
Override to replace the placeholders with the values from the resultsjava.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 seriesvoid
setAllowCustomValues(boolean customValues)
Sets whether custom values are allowed to be enteredvoid
setDisplay(java.lang.String value)
manually sets the display value this field should havevoid
setValue(java.lang.String value)
Sets the current value of the field-
Methods inherited from class com.inet.taskplanner.server.api.field.Field
getConditions, getKey, getLabel, getPlaceholder, getType, getValue, isUpdateValuesOnChange, isValueSavable, replaceSeriesPlaceholders, setConditions, setKey, setLabel, setPlaceholder, setType, setType, setUpdateValuesOnChange, setValueSavable
-
-
-
-
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 fieldlabel
- the label to be displayed in front of the fieldtypeID
- 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
-
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 classField
- Parameters:
value
- the value to be patchedseriesProperties
- 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 classField
- Parameters:
value
- the value to be patchedresults
- the results that contain the meta properties that are replaced- Returns:
- the new value with replaced placeholders
-
-