Interface IFormReplacerParams
- All Superinterfaces:
ILanguageTagProviding
,IReplacerParams
,Serializable
- All Known Subinterfaces:
IPlaceholderValueParams
- All Known Implementing Classes:
DefaultReplacerParameters
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiondefault IPlaceholderEscaper
The placeholder escaper, which should applied for the replaced placeholder values before they returned to the documentdefault String
default IRepetitionContainer
When a form element placeholder is replaced and the form element is repeated, all repeated values are joined with a comman by default and used as the replacement value.boolean
Deprecated.default boolean
default boolean
void
setFormData
(IFormDataAdapter formData)
-
Method Details
-
getClient
Mandant getClient()- Returns:
- the current
Mandant
object
-
getRepetitionContainer
When a form element placeholder is replaced and the form element is repeated, all repeated values are joined with a comman by default and used as the replacement value. When a repetition container is given as the context for the replacement and the form element is inside the same reptition container, only the value at the given index is used.For example, let's say we have a form with the following elements:
- ed1
- fs1 (repeated fieldset with the following elements)
- tf1
- tf2
- fs2 (repeated fieldset with the following elements)
- upl1
- upl2
valTf1_1
,valTf1_2
,valTf2_1
,valTf1_2
,valUpl1_1
,valUpl1_2
,valUpl2_1
,valUpl2_2
.Now when we have the placeholder
[%ed1%]_[%tf1%]_[%upl2%]
, it is replaced byvalEd1_valTf1_1,valTf1_2_valUpl2_1,valUpl2_2
by default.But if we are making the replacement within the context of
upl2
, e.g. when that placeholder is used to compute the file name forupl2
, we want to use only the value of the current repetition forupl2
, not a values joined with a comma.To do this, we can set the repetition container to
(name="fs2", index=0)
. Then the placeholder evaluates tovalEd1_valTf1_1,valTf1_2_valUpl2_1
. If we set the context to(name="fs2", index=1)
instead, the placeholder evaluatesvalEd1_valTf1_1,valTf1_2_valUpl2_2
.- Returns:
- The repetition context where the replacement is made. May be
null
.
-
getEscaper
Description copied from interface:IReplacerParams
The placeholder escaper, which should applied for the replaced placeholder values before they returned to the document- Specified by:
getEscaper
in interfaceIReplacerParams
- Returns:
- an instance of
IPlaceholderEscaper
-
getLanguageTag
- Specified by:
getLanguageTag
in interfaceILanguageTagProviding
- Returns:
- The language tag (
Locale.toLanguageTag()
) provided by this object.
-
getFormData
IFormDataAdapter getFormData() -
getFormVersion
FormVersion getFormVersion()- Returns:
- the current
FormVersion
object
-
getProcess
Vorgang getProcess()- Returns:
- the current
Vorgang
object
-
isEncodeForHTML
Deprecated. -
isEncodeFormValuesForPlaceholder
default boolean isEncodeFormValuesForPlaceholder()- Specified by:
isEncodeFormValuesForPlaceholder
in interfaceIReplacerParams
-
setFormData
-
isReplaceFormPlaceholders
default boolean isReplaceFormPlaceholders()- Returns:
- When
false
, form placeholders are not replaced.
-