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

  • 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 becomes false if you don't set this value.

    • isNotEmptyOnSearch

      protected HtmlItem.HtmlItemConditionContainer<Boolean> isNotEmptyOnSearch
  • Constructor Details

    • HtmlItem

      public HtmlItem(String itemPropertyPath)
      Constructs a new instance.
      Parameters:
      itemPropertyPath - itemPropertyPath
  • Method Details

    • itemNameKey

      public HtmlItem itemNameKey(@RequireNonempty String itemNameKey)
      Overrides:
      itemNameKey in class jp.ecuacion.lib.core.item.EclibItem
    • hideValue

      public HtmlItem hideValue()
      Overrides:
      hideValue in class jp.ecuacion.lib.core.item.EclibItem
    • notEmpty

      public HtmlItem notEmpty()
      Sets isNotEmpty == true, which means you want the item to be not empty.
      Returns:
      HtmlItem
    • isNotEmpty

      public HtmlItem isNotEmpty(boolean isNotEmpty)
      Sets isNotEmpty to isNotEmpty.
      Parameters:
      isNotEmpty - isNotEmpty
      Returns:
      HtmlItem
    • isNotEmpty

      public HtmlItem isNotEmpty(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isNotEmpty)
      Sets isNotEmpty to isNotEmpty with the conditions of HtmlItemConditionKeyEnum, authString.

      When you set multiple conditions to it, the order matters. First condition prioritized.

      Parameters:
      authKind - authKind
      authString - authString
      isNotEmpty - isNotEmpty
      Returns:
      HtmlItem
    • getIsNotEmpty

      public boolean getIsNotEmpty(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean)
      Obtains isNotEmpty.
      Parameters:
      loginState - loginState
      bean - bean
      Returns:
      boolean
    • notEmptyOnSearch

      public HtmlItem notEmptyOnSearch()
      Sets required.
      Returns:
      HtmlItem
    • isNotEmptyOnSearch

      public HtmlItem isNotEmptyOnSearch(boolean isRequired)
      Sets required.
      Returns:
      HtmlItem
    • isNotEmptyOnSearch

      public HtmlItem isNotEmptyOnSearch(HtmlItem.HtmlItemConditionKeyEnum authKind, String authString, boolean isRequired)
      Sets isNotEmptyOnSearch with the conditions of HtmlItemConditionKeyEnum, authString.

      When you set multiple conditions to it, the order matters. First condition prioritized.

      Parameters:
      authKind - authKind
      authString - authString
      isRequired - isRequired
      Returns:
      HtmlItem
    • getIsNotEmptyOnSearch

      public boolean getIsNotEmptyOnSearch(String loginState, SplibSecurityUtil.RolesAndAuthoritiesBean bean)
      Obtains isNotEmpty.
      Parameters:
      loginState - loginState
      bean - bean
      Returns:
      boolean