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 receives multiple optional attributes.
It's written like 'readonly,required'.
It also receives key value parameter like 'readonly,a=b,required'.
-
Constructor Summary
ConstructorsConstructorDescriptionSplibThymeleafOptionUtil(jakarta.servlet.http.HttpServletRequest request) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns cols with default value 1.getDeleteConfirmMessage(String rootRecordName, String itemDisplayedOnDelete) Provides message string shown when the delete button pressed.getLinkUrl(String options) Returns linkUrl.booleanReturns if specified key exists in options.booleanhasLinkUrl(String options) Returns whether the options contain linkUrl.booleanhasThSortable(String options) Returns whether the options contain thSortable.booleanReturns whether the options contain deleted.booleanisDisabled(String options) Returns whether the options contain disabled.booleanisForSwitch(String options) Returns whether the options contain forSwitch.booleanisReadOnly(String options) Returns whether the options contain readonly.booleanisWidthFull(String options) Returns whether the options contain full.booleanisWidthHalf(String options) Returns whether the options contain half.booleanneedsEmptyOption(String options) Returns whether the options contain noEmptyOption.booleanneedsOnclickJs(String options) Returns whether the options contain onClickJs.Returns rows with default value 1.
-
Constructor Details
-
SplibThymeleafOptionUtil
public SplibThymeleafOptionUtil(jakarta.servlet.http.HttpServletRequest request) Constructs a new instance.- Parameters:
request- request
-
-
Method Details
-
getDeleteConfirmMessage
Provides message string shown when the delete button pressed.itemDisplayedOnDeleteには、通常は一つのitemを指定するが、"itemA,itemB"のように複数の項目を指定することも可能。 (natural keyが複数の項目からなる場合に使用) その場合は、(itemA, itemB) : (1, 2) のように括弧で括った形で表現
-
hasKey
Returns if specified key exists in options. -
isReadOnly
Returns whether the options contain readonly.- Parameters:
options- options- Returns:
- boolean
-
isDisabled
Returns whether the options contain disabled.- Parameters:
options- options- Returns:
- boolean
-
isDeleted
Returns whether the options contain deleted.- Parameters:
options- options- Returns:
- boolean
-
isForSwitch
Returns whether the options contain forSwitch.- Parameters:
options- options- Returns:
- boolean
-
needsEmptyOption
Returns whether the options contain noEmptyOption.- Parameters:
options- options- Returns:
- boolean
-
needsOnclickJs
Returns whether the options contain onClickJs.- Parameters:
options- options- Returns:
- boolean
-
hasLinkUrl
Returns whether the options contain linkUrl.- Parameters:
options- options- Returns:
- boolean
-
getLinkUrl
Returns linkUrl.- Parameters:
options- options- Returns:
- linkUrl
-
rows
Returns rows with default value 1.- Parameters:
options- options- Returns:
- linkUrl
-
cols
Returns cols with default value 1.- Parameters:
options- options- Returns:
- linkUrl
-
hasThSortable
Returns whether the options contain thSortable.- Parameters:
options- options- Returns:
- boolean
-
isWidthFull
Returns whether the options contain full.- Parameters:
options- options- Returns:
- boolean
-
isWidthHalf
Returns whether the options contain half.- Parameters:
options- options- Returns:
- boolean
-