Class HtmlItem
java.lang.Object
jp.ecuacion.lib.core.item.EclibItem
jp.ecuacion.splib.web.item.HtmlItem
- Direct Known Subclasses:
HtmlItemNumber, HtmlItemSelect, HtmlItemString
public class HtmlItem
extends jp.ecuacion.lib.core.item.EclibItem
Stores attributes of an html component which control the behaviors of the component
in html pages.
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 an item allows empty.protected HtmlItem.HtmlItemConditionContainer<Boolean> Fields inherited from class jp.ecuacion.lib.core.item.EclibItem
itemNameKeyClass, itemNameKeyField, itemPropertyPath, showsValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetIsNotEmpty(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Obtains isNotEmpty.booleangetIsNotEmptyOnSearch(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean) Obtains isNotEmpty.isNotEmpty(boolean isNotEmpty) Sets isNotEmpty toisNotEmpty.isNotEmpty(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isNotEmpty) Sets isNotEmpty toisNotEmptywith the conditions ofHtmlItemConditionKeyEnum,authString.isNotEmptyOnSearch(boolean isRequired) Sets required.isNotEmptyOnSearch(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Sets isNotEmptyOnSearch with the conditions ofHtmlItemConditionKeyEnum,authString.itemNameKey(String itemNameKey) notEmpty()Sets isNotEmpty == true, which means you want the item to be not empty.Sets required.Methods inherited from class jp.ecuacion.lib.core.item.EclibItem
getItemNameKey, getItemNameKey, getItemPropertyPath, getShowsValue, setsItemNameKeyClassExplicitly
-
Field Details
-
isNotEmpty
Shows whether an item allows empty.When this value is
true, required validation is executed on server side, and "required" mark is shown on the component in the html page.It doesn't depend on the data type. You can use this for number or any other 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.- Parameters:
itemPropertyPath- itemPropertyPath
-
-
Method Details
-
itemNameKey
-
hideValue
- Overrides:
hideValuein classjp.ecuacion.lib.core.item.EclibItem
-
notEmpty
Sets isNotEmpty == true, which means you want the item to be not empty.- Returns:
- HtmlItem
-
isNotEmpty
Sets isNotEmpty toisNotEmpty.- Parameters:
isNotEmpty- isNotEmpty- Returns:
- HtmlItem
-
isNotEmpty
public HtmlItem isNotEmpty(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isNotEmpty) Sets isNotEmpty toisNotEmptywith 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
-
isNotEmptyOnSearch
-
isNotEmptyOnSearch
public HtmlItem isNotEmptyOnSearch(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired) Sets isNotEmptyOnSearch 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
-