Class CustomValueAutoFillSource
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.autofill.AbstractStaticAutoFillSource
org.ametys.plugins.forms.question.autofill.CustomValueAutoFillSource
- All Implemented Interfaces:
AutofillSource
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Class for adding custom value as default value in text fields
-
Field Summary
FieldsModifier and TypeFieldDescriptionMap of ModelItems specific to CustomValueAutoFillSourcestatic final String
Constant for default value attribute.Fields inherited from class org.ametys.plugins.forms.question.autofill.AbstractStaticAutoFillSource
_autoFillSourceExtensionPoint, _currentUserProvider, _description, _id, _label, _pluginName, _userManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAutofillValue
(FormQuestion question) Get autofill valueGet the type model items If the return value is null there won't be any processing on the server sideGet the view items for the main tabboolean
isCacheable
(FormQuestion question) Returntrue
if the question can be cacheable with this source.Methods inherited from class org.ametys.plugins.forms.question.autofill.AbstractStaticAutoFillSource
configure, getDescription, getId, getLabel, saxAdditionalInfos, service, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ATTRIBUTE_DEFAULT_VALUE
Constant for default value attribute.- See Also:
-
_autoFillItems
Map of ModelItems specific to CustomValueAutoFillSource
-
-
Constructor Details
-
CustomValueAutoFillSource
public CustomValueAutoFillSource()
-
-
Method Details
-
getAutofillValue
Description copied from interface:AutofillSource
Get autofill value- Parameters:
question
- the question- Returns:
- the autofill value.
-
getModelItems
Description copied from interface:AutofillSource
Get the type model items If the return value is null there won't be any processing on the server side- Returns:
- a list of the model items
-
getViewElements
Description copied from interface:AutofillSource
Get the view items for the main tab- Returns:
- a list of view items
-
isCacheable
Description copied from interface:AutofillSource
Returntrue
if the question can be cacheable with this source.- Parameters:
question
- the question- Returns:
true
if the question can be cacheable.
-