- Direct Known Subclasses:
HtmlFieldNumber,HtmlFieldString
It is named with "field"
because it's name is defined in the "field" format
like mailAddress, not like acc.mailAddress.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStores one HtmlField condition.static classStores multiple HtmlField conditions.static enumIs the condition which decides isNotEmpty or not. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringIs an ID to the display name of the field.protected StringIs an ID which the root record name plus dot (like"acc.") is removed from the itemId.protected HtmlField.HtmlFieldConditionContainer<Boolean> Shows whether the field allows empty. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondisplayNameId(String displayNameId) SetsdisplayNameIdand returns this for method chain.ReturnsdisplayNameIdvalue.getId()booleangetIsNotEmpty(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Obtains isNotEmpty.isNotEmpty(boolean isNotEmpty) Sets isNotEmpty.isNotEmpty(HtmlField.HtmlFieldConditionKeyEnum authKind, String authString, boolean isNotEmpty) Sets isNotEmpty with the conditions ofHtmlFieldConditionKeyEnum,authString.
-
Field Details
-
id
Is an ID which the root record name plus dot (like"acc.") is removed from the itemId.When you treat the field in the record belonging to the root record, you need to define it like
childRecord.childFieldName.It is required if you construct this class.
-
displayNameId
Is an ID to the display name of the field.The display name can be obtained by referring
item_names.propertieswith it. -
isNotEmpty
Shows whether the field allows empty.When this value is
true, required validation is executed on server side, and shows "required" mark on the component in the html page.It doesn't depend on the data type.
The default value is preset:
false. So the value becomesfalseif you don't have to set this value.
-
-
Constructor Details
-
HtmlField
Constructs a new instance withID.- Parameters:
id- fieldId
-
-
Method Details
-
getId
-
displayNameId
SetsdisplayNameIdand returns this for method chain.- Parameters:
displayNameId- displayNameId- Returns:
- HtmlField
-
getDisplayNameId
ReturnsdisplayNameIdvalue.Its value is
nullmeans the item's original itemId is equal to displayNameId.- Returns:
- displayNameId
-
isNotEmpty
Sets isNotEmpty.Set
truewhen you want to the item is required.- Parameters:
isNotEmpty- isNotEmpty- Returns:
- HtmlField
-
isNotEmpty
public HtmlField isNotEmpty(HtmlField.HtmlFieldConditionKeyEnum authKind, String authString, boolean isNotEmpty) Sets isNotEmpty with the conditions ofHtmlFieldConditionKeyEnum,authString.When you set multiple conditions to it, the order matters. First condition prioritized.
- Parameters:
authKind- authKindauthString- authStringisNotEmpty- isNotEmpty- Returns:
- HtmlField
-
getIsNotEmpty
Obtains isNotEmpty.- Parameters:
loginState- loginStatebean- bean- Returns:
- boolean
-