Package de.xima.fc.form.common.models
Interface IXBaseValidationParams
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IXGlobalValidationParams
,IXValidationParams
- All Known Implementing Classes:
XGlobalValidationParams
,XValidationParams
public interface IXBaseValidationParams extends Serializable
Base interface with common methods for bothIXValidationParams
andIXGlobalValidationParams
.- Since:
- 6.6.3
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description long
getClientId()
Map<String,? extends IFormContainerMetaData>
getDynContainerMap()
Map<String,List<String[]>>
getFieldValuesMap()
IXFormRenderConfig
getFormRenderConfig()
Map<Serializable,Serializable>
getFRQSessionAttributes()
String
getI18nValue(String i18nKey)
default Locale
getLocale()
List<String[]>
getValues(String key)
boolean
isShouldValidate()
Whether server-side validation should be performed.boolean
isValuesEmpty(List<String[]> values)
-
-
-
Method Detail
-
getClientId
long getClientId()
- Returns:
- The ID of the current client to which the form belongs.
-
getFieldValuesMap
Map<String,List<String[]>> getFieldValuesMap()
- Returns:
- A map with all values that were submitted. The key is the name of a form field.
-
getDynContainerMap
Map<String,? extends IFormContainerMetaData> getDynContainerMap()
- Returns:
- A map with the meta data for repeated elements. The key is the name of a form field.
-
getFormRenderConfig
IXFormRenderConfig getFormRenderConfig()
- Returns:
- The current form render config for accessing the global configuration of the validation process.
-
getFRQSessionAttributes
Map<Serializable,Serializable> getFRQSessionAttributes()
- Returns:
- All attributes from the current form request session.
-
getI18nValue
String getI18nValue(String i18nKey)
- Parameters:
i18nKey
- I18n key for the localized message.- Returns:
- The localized message for the given key, retrieved from the built-in resource bundle. Plugin resource bundles are not considered.
-
getLocale
default Locale getLocale()
- Returns:
- The current locale to be used for creating error messages.
-
getValues
List<String[]> getValues(String key)
- Parameters:
key
- Name of a form field.- Returns:
- All values that were submitted for the given for the given form field name. The list contains multiple
items when the form field is repeated; the array contains multiple items when the form field submitted multiple
values (e.g. a select element with
multiple
set).
-
isValuesEmpty
boolean isValuesEmpty(List<String[]> values)
- Parameters:
values
- List of values of a form field.- Returns:
true
if the values are all empty, orfalse
otherwise.
-
isShouldValidate
boolean isShouldValidate()
Whether server-side validation should be performed. Server-validation may be disabled due to one of several reasons:- The element is not rendered due to a state or user group condition.
- The element is disabled due to a state or user group condition.
- The form action does not require validation. When designing a form, the user can choose whether the form should
be validated when the a submit button is pressed. This returns
true
when a submit button was pressed that requires the form to be validated, andfalse
.
false
. However, there are some use cases when validation needs to be performed no matter the circumstances. In that case, this flag may be ignored.- Returns:
- Whether the form element should be validated.
-
-