- Direct Known Subclasses:
HtmlItemNumber,HtmlItemString
HtmlItem is a kind of "item"s. See naming-convention.md
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStores one HtmlItem condition.static classStores multiple HtmlItem conditions.static enumIs the condition which decides isNotEmpty or not. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HtmlItem.HtmlItemConditionContainer<Boolean> Shows whether the field allows empty.protected HtmlItem.HtmlItemConditionContainer<Boolean> protected StringIs a class part (= left part) of itemNameKey.protected StringIs a field part (= right part) of itemNameKey.protected StringIs the ID string of htmlItem. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetIsNotEmpty(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Obtains isNotEmpty.booleangetIsNotEmptyOnSearch(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Obtains isNotEmpty.getItemNameKey(String rootRecordName) ReturnsitemNameKeyvalue.booleangetRequiredOnSearch(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Deprecated.isNotEmpty(boolean isNotEmpty) Sets isNotEmpty.isNotEmpty(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isNotEmpty) Sets isNotEmpty with the conditions ofHtmlItemConditionKeyEnum,authString.isNotEmptyOnSearch(boolean isRequired) Sets required.isNotEmptyOnSearch(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Sets isRequiredOnSearch with the conditions ofHtmlItemConditionKeyEnum,authString.itemNameKey(String itemNameKey) SetsitemNameKeyand returns this for method chain.notEmpty()Sets isNotEmpty == true, which means you want the item to be not empty.Sets required.required()Deprecated.required(boolean isRequired) Deprecated.required(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Deprecated.requiredOnSearch(boolean isRequired) Deprecated.requiredOnSearch(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Deprecated.
-
Field Details
-
itemPropertyPath
Is the ID string of htmlItem.rootRecordName part (= far left part) can be omitted. Namely it can be "name" or "dept.name" when the propertyPath with rootRecordName added (= also called "recordPropertyPath") is "acc.name" or "acc.dept.name" where "acc" is the rootRecordName.
-
itemNameKeyClass
Is a class part (= left part) of itemNameKey. (like "acc" from itemNameKey: "acc.name")The display name can be obtained by referring
item_names.propertieswith it. -
itemNameKeyField
Is a field part (= right part) of itemNameKey. (like "name" from itemNameKey: "acc.name")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 set this value. -
isNotEmptyOnSearch
-
-
Constructor Details
-
HtmlItem
Constructs a new instance withitemPropertyPath.Generally propertyPath starts with a rootRecord (a record field name which is directly defined in a form), which should be like
user.nameoruser.dept.name. (It's calledrecordPropertyPathin the library.)
But here you need to setitemPropertyPath, which is a propertyPath with rootRecordName + "." removed at the start part of it.
You cannot set recordPropertyPath here. Setting it is considered as a duplication of rootRecordName.- Parameters:
itemPropertyPath- itemPropertyPath
-
-
Method Details
-
getItemPropertyPath
-
itemNameKey
SetsitemNameKeyand returns this for method chain.The format of itemNameKey is the same as itemNameKey, which is like "acc.name", always has one dot (not more than one) in the middle of the string.
But the argument of the method can be like "name". In that case itemNameKeyClass is used instead. When itemNameKeyClass isnull, rootRecordName is used instead.- Parameters:
itemNameKey- itemNameKey- Returns:
- HtmlItem
-
getItemNameKey
ReturnsitemNameKeyvalue.Its value is
nullmeans the item's original itemNameKey is equal to itemNameKey.- Returns:
- itemNameKeyFieldForName
-
required
Deprecated.Sets required = true.- Returns:
- HtmlItem
-
required
Deprecated.Sets required.- Returns:
- HtmlItem
-
required
@Deprecated public HtmlItem required(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Deprecated.Sets isRequired with the conditions ofHtmlItemConditionKeyEnum,authString.When you set multiple conditions to it, the order matters. First condition prioritized.
- Parameters:
authKind- authKindauthString- authStringisRequired- isRequired- Returns:
- HtmlItem
-
requiredOnSearch
Deprecated.Sets required.- Returns:
- HtmlItem
-
requiredOnSearch
@Deprecated public HtmlItem requiredOnSearch(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Deprecated.Sets isRequiredOnSearch with the conditions ofHtmlItemConditionKeyEnum,authString.When you set multiple conditions to it, the order matters. First condition prioritized.
- Parameters:
authKind- authKindauthString- authStringisRequired- isRequired- Returns:
- HtmlItem
-
getRequiredOnSearch
@Deprecated public boolean getRequiredOnSearch(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Deprecated.Obtains isNotEmpty.- Parameters:
loginState- loginStatebean- bean- Returns:
- boolean
-
notEmpty
Sets isNotEmpty == true, which means you want the item to be not empty.- Returns:
- HtmlItem
-
isNotEmpty
Sets isNotEmpty.Set
truewhen you want to the item is not empty.- Parameters:
isNotEmpty- isNotEmpty- Returns:
- HtmlItem
-
isNotEmpty
public HtmlItem isNotEmpty(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isNotEmpty) Sets isNotEmpty with the conditions ofHtmlItemConditionKeyEnum,authString.When you set multiple conditions to it, the order matters. First condition prioritized.
- Parameters:
authKind- authKindauthString- authStringisNotEmpty- isNotEmpty- Returns:
- HtmlItem
-
getIsNotEmpty
Obtains isNotEmpty.- Parameters:
loginState- loginStatebean- bean- Returns:
- boolean
-
notEmptyOnSearch
Sets required.- Returns:
- HtmlItem
-
isNotEmptyOnSearch
Sets required.- Returns:
- HtmlItem
-
isNotEmptyOnSearch
public HtmlItem isNotEmptyOnSearch(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Sets isRequiredOnSearch with the conditions ofHtmlItemConditionKeyEnum,authString.When you set multiple conditions to it, the order matters. First condition prioritized.
- Parameters:
authKind- authKindauthString- authStringisRequired- isRequired- Returns:
- HtmlItem
-
getIsNotEmptyOnSearch
public boolean getIsNotEmptyOnSearch(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Obtains isNotEmpty.- Parameters:
loginState- loginStatebean- bean- Returns:
- boolean
-