Class InputTimeRange

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 @Configurable @Ignore("FILTER_CRITERION") public class InputTimeRange extends InputRegExp
This component extends InputRegExp and must be used to create an input field for a range of time. The output string will be composed of how many values are given as input (none, start time or end time) and predefined labels.
See Also:
GCApi:
component
  • Field Details

  • Constructor Details

    • InputTimeRange

      public InputTimeRange()
  • Method Details

    • setup

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

      protected void setupTimeFormat()
    • registerValidators

      protected void registerValidators()
      Overrides:
      registerValidators in class Input
    • setVALUE1

      public void setVALUE1(String s)
      Sets the first value to use as start range. This value is overwritten from setNAME() or setNAME1().
      It's possible to use this value singly to create a "after" range.
      It is same thing use setVALUE().
      Parameters:
      s - The value to set as start range.
    • setVALUE

      public void setVALUE(String s)
      Sets the first value to use as start range. This value is overwritten from setNAME() or setNAME1().
      It's possible to use this value singly to create a "after" range.
      It is same thing use setVALUE1().
      Overrides:
      setVALUE in class Input
      Parameters:
      s - The value to set as start range.
    • setVALUE2

      public void setVALUE2(String s)
      Sets the second value to use as end range. This value is overwritten from setNAME2().
      It's possible to use this value singly to create a "by" range.
      Parameters:
      s - The value to set as end range.
    • setNAME

      public void setNAME(String s)
      Sets the name key of the first value to search in the passed values to use as start range. This value overwrites setVALUE() and setVALUE1().
      It's possible to use this value singly to create a "after" range.
      It is same thing use setNAME1().
      Overrides:
      setNAME in class Input
      Parameters:
      s - The string rappresents the key of the value in the passed values (see Control.getValues()).
    • setNAME1

      public void setNAME1(String s)
      Sets the name key of the first value to search in the passed values to use as start range. This value overwrites setVALUE() and setVALUE1().
      It's possible to use this value singly to create a "after" range.
      It is same thing use setNAME().
      Parameters:
      s - The string rappresents the key of the value in the passed values (see Control.getValues()).
    • setNAME2

      public void setNAME2(String s)
      Sets the name key of the second value to search in the passed values to use as end range. This value overwrites setVALUE2().
      It's possible to use this value singly to create a "by" range.
      Parameters:
      s - The string rappresents the key of the value in the passed values (see Control.getValues()).
    • setSDF

      public void setSDF(String s)
      Set the time format to apply on value find in the passed value, so when you are using setNAME(), setNAME1() or setNAME2().
      Parameters:
      s - String rappresenting the new format (see SimpleDateFormat).
    • setPLACEHOLDER

      public void setPLACEHOLDER(String s)
      Sets the placeholder of the field to use as start range, the short hint that usually describes the expected value that appears in the field before the user enters a value.
      The text is subject to translation.
      It is same thing use setPLACEHOLDER1().
      Overrides:
      setPLACEHOLDER in class Input
      Parameters:
      s - The string that will appear as a placeholder in the start range field
    • setPLACEHOLDER1

      public void setPLACEHOLDER1(String s)
      Sets the placeholder of the field to use as start range, the short hint that usually describes the expected value that appears in the field before the user enters a value.
      * The text is subject to translation.
      It is same thing use setPLACEHOLDER().
      Parameters:
      s - The string that will appear as a placeholder in the start range field
    • setPLACEHOLDER2

      public void setPLACEHOLDER2(String s)
      Sets the placeholder of the field to use as end range, the short hint that usually describes the expected value that appears in the field before the user enters a value.
      * The text is subject to translation.
      Parameters:
      s - The string that will appear as a placeholder in the end range field
    • validate1

      protected void validate1(org.apache.ecs.html.Input i, String groupname, EntitySet es, boolean ro)
    • validate2

      protected void validate2(org.apache.ecs.html.Input i, String groupname, EntitySet es, boolean ro)
    • validate0

      protected void validate0(org.apache.ecs.html.Input i, String groupname, EntitySet es, boolean ro)
    • getGroupName

      protected String getGroupName()
    • 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
    • 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
    • addAttributes

      protected void addAttributes(org.apache.ecs.html.Input i0, org.apache.ecs.html.Input i1, org.apache.ecs.html.Input i2, boolean ro, boolean enabled)
    • prepareValue0

      protected boolean prepareValue0()
    • prepareValue1

      protected String prepareValue1()
    • prepareValue2

      protected String prepareValue2()
    • 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
    • setPlaceholder

      public void setPlaceholder(String s)
      Sets the placeholder of the field to use as start range, the short hint that usually describes the expected value that appears in the field before the user enters a value.
      The text is not subject to translation.
      It is same thing use setPlaceholder1().
      Parameters:
      s - The string that will appear as a placeholder in the start range field
    • setPlaceholder1

      public void setPlaceholder1(String s)
      Sets the placeholder of the field to use as start range, the short hint that usually describes the expected value that appears in the field before the user enters a value.
      The text is not subject to translation.
      It is same thing use setPlaceholder().
      Parameters:
      s - The string that will appear as a placeholder in the start range field
    • setPlaceholder2

      public void setPlaceholder2(String s)
      Sets the placeholder of the field to use as end range, the short hint that usually describes the expected value that appears in the field before the user enters a value.
      The text is not subject to translation.
      Parameters:
      s - The string that will appear as a placeholder in the end range field
    • validateConcreteValue

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