java.lang.Object
jp.ecuacion.splib.web.util.SplibThymeleafOptionUtil
Analyzes options specified with html components.
It's called from thymeleaf.
Options are in the format of csv and able to receive multiple optional attributes.
It's written like 'readonly,required'.
It also receives key value parameter like 'readonly,id=deptName,required'.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns value obtained from the key.getValueOrElse(String options, String key, String defaultValue) Returns value obtained from the key, or defaultValue when the key does not exist in the properties file.booleanReturns if specified key exists in options.
-
Constructor Details
-
SplibThymeleafOptionUtil
public SplibThymeleafOptionUtil()Constructs a new instance.
-
-
Method Details
-
hasKey
Returns if specified key exists in options. -
getValue
Returns value obtained from the key.- Parameters:
options- optionskey- key- Returns:
- value
-
getValueOrElse
Returns value obtained from the key, or defaultValue when the key does not exist in the properties file.- Parameters:
options- optionskey- keydefaultValue- defaultValue- Returns:
- value
-