Class InputDate

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

This class extends Input field to work with dates.
The default date format set is dd/MM/yy.
See Also:
GCApi:
component
  • Field Details

  • Constructor Details

    • InputDate

      public InputDate()
      Creates a new instance of InputDate
  • Method Details

    • setAUTOEVENTANCHOR

      public void setAUTOEVENTANCHOR(String s)
      Defines the name of the anchor that is used to reposition the scrolling of the page following the execution of the autoevent associated with the Input. The name must correspond to the value of a reference attribute of a Grid or a Section, set using the appropriate set methods (Grid.setREF(String), Section.setREF(String)).
      The relocation mechanism works only with non-Ajax events, the ones that reload the page.
      Parameters:
      s - The name of the anchor
    • setAUTOEVENT

      public void setAUTOEVENT(String s)
      Set an event on the field that is launched when the field lose the focus.
      Parameters:
      s - Name of the event to launch when the field lose the focus.
    • setAUTOEVENTPARAM

      public void setAUTOEVENTPARAM(String s)
      Set the value that will be passed to the hash getter as a parameter when the autoevent is triggered. The key of the value into hash getter will be "param"
      Parameters:
      s - Value passed to the hash getter as a parameter
    • setAUTOEVENTMSG

      public void setAUTOEVENTMSG(String s)
      Set the message that will appear into a javascript pop up when the autoevent is triggered.
      Parameters:
      s - Message to show into the javascript pop up.
    • setup

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

      public void setSDF(String s)
      Set the date format will be sent to server with submit of the field (see SimpleDateFormat). If it isn't set the default value is "dd/MM/yy".
      Parameters:
      s - The string of the date format.
    • setSDFWRITE

      public void setSDFWRITE(String s)
      Set the date format to show in the field or accepted if the user enter the value manually (see SimpleDateFormat). If it isn't set the default value is "dd/MM/yyyy".
      Parameters:
      s - The string of the date format.
    • setFIRSTDAYOFWEEK

      public void setFIRSTDAYOFWEEK(String s)
      Set what day is the first of the week when user open the calendar. The default day is monday.
      Parameters:
      s - Character to set the first day of the week (case insensitive). The possible value are:
      • "m": Monday;
      • "s": Sunday.
    • setRANGE

      public void setRANGE(String s)
      Set the field as a part of a date range.
      Parameters:
      s - String to define which type of range you are defining. Below are the allowed values:
      • "FROM": set the start of the date range. If the date isn't set, it is automatically set to DATE_MIN
      • "TO": set the end of the date range. If the date isn't set, it is automatically set to DATE_MAX
    • setFROM

      public void setFROM(String s)
      Set a minimum constraint in the date field. It is a inclusive limit.
      Parameters:
      s - String with the value to set as limit. It is possible insert a string in the format "dd/MM/yyyy" or the string "now" to indicate the current date as limit.
    • setTO

      public void setTO(String s)
      Set a maximum constraint in the date field. It is a inclusive limit.
      Parameters:
      s - String with the value to set as limit. It is possible insert a string in the format "dd/MM/yyyy" or the string "now" to indicate the current date as limit.
    • setFROMNAME

      public void setFROMNAME(String s)
      Indicate the name of the field to use as "from" constraint.
      Parameters:
      s - Name of the field to use
    • setTONAME

      public void setTONAME(String s)
      Indicate the name of the field to use as "to" constraint.
      Parameters:
      s - Name of the field to use
    • validate

      protected void validate(org.apache.ecs.html.Input i, EntitySet es, boolean ro)
      Overrides:
      validate in class Input
    • getEventButton

      protected org.apache.ecs.Element getEventButton(boolean ro, String script)
    • getContentHtml

      public org.apache.ecs.Element getContentHtml(Object generationhandle, EntitySet es)
      Override the method getContentHtml(generationhandle, es). 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 unique generating handle
      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
    • getHiddenHtml

      public org.apache.ecs.Element getHiddenHtml(Object generationhandle, EntitySet es)
      Override the method getHiddenHtml(generationhandle, es). Before to return hidden html, set the active components of the InputTime element.
      Specified by:
      getHiddenHtml in interface Arrangeable
      Overrides:
      getHiddenHtml in class Input
      Parameters:
      generationhandle - the unique generating handle
      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
    • prepareValue

      protected String prepareValue()
      Overrides:
      prepareValue in class Input
    • staticValue

      protected Date staticValue()
    • getDefaultValue

      public Object getDefaultValue()
      Description copied from class: Input
      Gets the default value set for this component.
      The default value of the component is the value set for the attribute value into the xml. See Input.setVALUE(String)
      Overrides:
      getDefaultValue in class Input
      Returns:
      The default value set for this component