Class InputMultiLookup

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Arrangeable, Badgeable, ValueValidator, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

@Component public class InputMultiLookup extends Input implements Arrangeable
This class extends Input and implements the graphic user interface element that presents a set of values selectable through a drop-down menu that appears when the user clicks on the field.
Values can be specified statically by adding a list of InputOption as children of the component, or dynamically, loading them from the database using a StaticView. If you want to allow the selection of a null value, you can simply add an empty InputOption as the first child of the component
See Also:
GCApi:
component
  • Field Details

    • _type

      protected String _type
    • _defaultValue

      protected String _defaultValue
    • _defaultOption

      protected String _defaultOption
    • _msgCampoValoreNonValido

      protected String _msgCampoValoreNonValido
  • Constructor Details

    • InputMultiLookup

      public InputMultiLookup()
      Creates an InputMultiLookup
  • Method Details

    • setup

      protected void setup()
      Description copied from class: Component
      Setup the Component
      Overrides:
      setup in class Input
    • setNOTNULL

      public void setNOTNULL(String s)
      Description copied from class: Input
      Defines if the value of the field can be empty when submitted
      By setting true to this attribute, the user can't make a submit until the value of the field is compiled
      Overrides:
      setNOTNULL in class Input
      Parameters:
      s - A string that represents a boolean value ("true" or "1", "false" or "0").
      If the string is not recognized as a boolean value, it will be used the default value, that is false
    • setNUMERIC

      public void setNUMERIC(String s)
      Description copied from class: Input
      Indicates if the field value should be considered as a numeric from the aspect point of view (right alignment)
      Overrides:
      setNUMERIC in class Input
      Parameters:
      s - A string that represents a boolean value ("true" or "1", "false" or "0").
      If the string is not recognized as a boolean value, it will be used the default value, that is false
    • setTYPE

      public void setTYPE(String s)
      Defines the type of the field values.
      Parameters:
      s - Accepted values are: "long" (that is also the default one), to state that the values are Long values; "string" to state that the values are String values.
    • typeString

      protected boolean typeString()
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Description copied from class: Input
      Returns the html of the Input element
      Overrides:
      getHtml in class Input
      Parameters:
      es - The EntitySet
      Returns:
      The html of the Input element
    • getGenerationHandle

      public Object getGenerationHandle()
      Description copied from class: Input
      Implements the interface Arrangeable
      Specified by:
      getGenerationHandle in interface Arrangeable
      Overrides:
      getGenerationHandle in class Input
      Returns:
      null
    • getDescriptionHtml

      public org.apache.ecs.Element getDescriptionHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the html code that represents the component description i.e. the formatted label of the field
      Specified by:
      getDescriptionHtml in interface Arrangeable
      Overrides:
      getDescriptionHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the label, or null if the field don't have it or is hidden
    • getHiddenHtml

      public org.apache.ecs.Element getHiddenHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the hidden but active html part of an hidden input field.
      Specified by:
      getHiddenHtml in interface Arrangeable
      Overrides:
      getHiddenHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the hidden part of the field or null if the field is visible.
    • prepareName

      protected String prepareName()
      Overrides:
      prepareName in class Input
    • validate

      protected void validate(org.apache.ecs.html.Select sel, EntitySet es, boolean ro)
    • getContentHtml

      public org.apache.ecs.Element getContentHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the html code that represents the active part of the input field, i.e. the field and the validation scripts
      Specified by:
      getContentHtml in interface Arrangeable
      Overrides:
      getContentHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the input field or null if the field don't have a graphical representation
    • setupSelectArray

      protected void setupSelectArray(org.apache.ecs.html.Select[] sel, int nLabel, boolean ro, boolean enabled, String style)
    • buildSetupScript

      public void buildSetupScript(StringBuilder sb)
      Description copied from class: Component
      Every component can add a script to the StringBuilder, script executed when the component is created.
      Overrides:
      buildSetupScript in class Component
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • isSelected

      public boolean isSelected(String sCurrentValue, boolean oldSelection)
    • buildDisplayScript

      public void buildDisplayScript(StringBuilder sb)
      Description copied from class: Input
      Every component can add a script to the StringBuilder, script executed when the component is displayed. The method add the script that controls the focus on the input field.
      Overrides:
      buildDisplayScript in class Input
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • publishValue

      protected void publishValue(Object value)
    • validateConcreteValue

      public void validateConcreteValue(String name, Object value, boolean strong, Map arriving) throws ValidationException
      Overrides:
      validateConcreteValue in class Input
      Throws:
      ValidationException